That didn't work for me. MacOS kept switching back to display mirroring.
My gear is MBP 2017 13".
External (primary) monitor is a new LG 29NW600 which is a 29" ultra-wide.
Checking in System Information under USB and shows this as a "Billboard device" with a SN of 1234577890ABCEDF.
Was using the LG software for splitting screen into zones but it would periodically start the spinner and after a while screens would flip off and on, both on laptop screen and the display.
I normally work with laptop closed and just use the external.
As mentioned in other posts the resolution keeps getting set back to 1080p instead of its own native. Setting to scaled doesnt help.
Have now turn off the LG control software and installed BetterDummy https://github.com/waydabber/BetterDummy/tree/v1.0.13 which seems to have solved the issue - at least it has kept the settings after a reboot which is already way better than macOS most of the time!