Problems switching between 4K laptop and 4K external monitor

I couldn’t find an existing bug matching this, sorry if it’s a dupe.

I have a Lenovo P52 with a 4K screen and an external 4K monitor on my desk at my home office. I often switch from using the laptop outside of my office (dining room, client, university where I teach) then come back to my office and switch to using the external monitor. I don’t mirror the monitor, my laptop is closed and I dock with a USB hub and the monitor.

Here’s the problem. When I got from external monitor back to laptop, Scrivener doesn’t resize properly. If I exit and restart Scrivener, things look as they should.

Here are two screenshots, one after switching to the laptop the other after I exit and restart Scrivener: