I found a destructive bug related to DELETE RECORD script step.
If you have a portal row selected when calling this step (directly or inside a script doesn't matter) FileMaker won't delete the record you're on, as expected, but it will delete the portal row you're on.
Even if you have no cascading delete active and the portal has no deletion option active.
I hope this will be fixed very quickly because the risk of losing data is very high.
Temporary fix: add a Save record in the script before calling Delete record.
To reproduce it, open the attach, go to record "Master 1", select a portal row and click the DELETE button.