TLDR (this solution comes with NO WARRANTY):
- Comment out or delete the
<primary>yes</primary> line(s) in your ~/.config/monitors.xml file;
- Restart Gnome with
Alt+F2 → r → Enter;
- With the focus on the primary monitor, experiment launching the apps that were arbitrarily opening windows in the secondary monitory.
I've accidentally solved this problem in my dual monitor setup. Don't even understand why it worked, but it worked:
While inspecting the ~/.config/monitors.xml file, I mistakenly thought that both monitors were flagged with the <primary>yes</primary> entry. So I tried to fix what I thought was a bad config in what I tought was the entry for the secondary monitor, changing it to <primary>no</primary>. After restarting Gnome, it worked like a charm ―case solved! But later, when I was looking at that file again in order to write this answer, I've noticed that there were actually two configurations in it, each listing my two monitors, and only the built-in notebook monitor had the <primary> tag under it in both of them...
What I have actually done was:
<configuration> (currently in use)
<logicalmonitor> (built-in display)
<primary>yes</primary> --> <primary>no</primary>
...
</logicalmonitor>
<logicalmonitor> (external display, no <primary> tag)
...
</logicalmonitor>
</configuration>
<configuration> (alternative)
...
</configuration>
I undid the change and (after restarting Gnome again) the bad behavior came back. Deleting or commenting out that line gives the same results as changing the yes to no. I would recommend to just comment it out.
Did some tests, it didn't break anything until now, as this specific setting isn't respected anyway. For example, without modifying the monitors file (with the built-in monitor flagged as "primary: yes"), the external display always ends as the primary monitor when I switch from "External Only" to "Join Displays" using the Super+P default keyboard shortcut.
In summary, it's a mess. But a bit less messier with this serendipitous solution.