My MacBook Pro (15-inch, 2018) is connected to two Lenovo ThinkVision P27q-10 displays via a Kensington SD5200T docking station. One display is connected to the docking station via DisplayPort; the other via HDMI. The Mac is connected to the docking station with a single USB-C cable. The display arrangement in macOS is set up accordingly and is working perfectly.
However, when I disconnect the Mac from the docking station and connect it to a different external monitor (e.g. a TV) via a HDMI dongle, then the display arrangement settings in macOS are reset the next time I reconnect the Mac to the docking station.
Does anyone have any idea why this is happening and how to fix it, so that I don't have to reconfigure the display arrangement each time I connect my Mac to a different display?