Do you have a second monitor with HDMI input? Some folks have found it necessary to connect a second monitor over HDMI (HDMI can be connected directly to the same AMD GPU) in order for the LG UltraFine or other Thunderbolt monitor to work more consistently.
Actually HDMI is not as consistent as DP in my case, I did the following test sets with my second monitor using HDMI rather than DP.
1. (a)Cold boot to Macos, the logging in session is on my LG 4K. Once getting into system, Ultrafine 5K has display, none of the other on-board devices are working. (b) warm reboot to macos, the logging in session this time is on Ultrafine 5k, after entering macos, nothing worked on Ultrafine 5K, no display, no devices.
2. (a)Cold boot to Macos, the logging in session is on my LG 4K. Once getting into system, Ultrafine 5K has display, none of the other on-board devices are working. (b) warm reboot to macos, the logging in session is on Ultrafine 5k, after entering macos, this time the on-board devices work, still no display.(c) I replug the ultrafine 5k, display gets back, all other devices are gone.
3. (a)Cold boot to Macos, the logging in session is on my LG 4K. Once getting into system, Ultrafine 5K has display, none of the other on-board devices are working. (b) warm reboot to macos, the logging in session is on Ultrafine 5k, after entering macos, this time the on-board devices work, no display. (c) warm reboot again into macos, the logging in session is on LG 4k, but before I get into macos, the content on LG 4K are shaking and colors are shifting. Looks just like the cable is broken or the GPU is been interfered. Once I get into desktop, LG 4k gets back to normal, no color shifting anymore. Now Ultrafine 5k has no display but on-board devices are working.
4. (a)Cold boot to Macos, the logging in session is on my LG 4K. Once getting into system, Ultrafine 5K has display showing up, but none of the other on-board devices are working. (b) warm reboot to windows, the Ultrafine works perfectly, no problem at all.
Note: When I used DP cable for LG 4k, the logging in session was always on the LG 4k. Ultrafine 5K never lit up before getting into the desktop.