Hi Andrew,
Welcome to Microsoft Community.
I'm Hahn and I'm here to help you with your concern.
I understand that you are experiencing issues with your Surface Thunderbolt 4 Dock and dual monitors. Based on the information you provided, it seems that the issue occurs only when you undock and redock your Surface Laptop 5.
Unfortunately, The best thing we could do is to refer you to the support channel that is best to handle your concern which would be our live support. They would be able to give you further options and assistance on this matter. See steps below in reaching them: Contact Us - Microsoft Support
I hope this helps. If there is anything not clear, please do not hesitate to let me know.
Your Sincerely
Hahn - MSFT | Microsoft Community Support Specialist