Internal server error in Admin after migration
After some debugging I found the answer:

Problem is caused by craft_searchindex using MyISAM as the table engine, while the rest are using InnoDB, and the server having enforce_gtid_consistency ON. This caused issues on transactions that included queries to MyISAM tables.

Seems that the reason for this is supporting full text searchess in old MySQL versions (as InnoDB gained full text search support around 5.6.4)

I'm now experimenting on switching the engine for that table and seems to work nicely.