Solved by merging a missing revision from another branch. In that revision, yellow entities were turned blue (and probably got the internal ID). Sebastiaan and Thijs, thanks again for your support.
A drop like that wouldn't normally happen unless you recreated the attribute or association (so it has a different id internally) or really changed the type in such a way it's impossible to preserve the current data. Do you see the same happening if you take the old 5.9 model and apply that to that database? What if you just convert the model to 5.16 and do it?
Had exactly the same problem. Reason was the merging of branches, this genated the drop statements.
We resolved this by backing up the database before the synchronization. We created db scripts that restored the data. To create the scripts, you need to analyse the synchronization script, detect all the drop statements and create a script per drop statement.