Hi gurusathyapathi,
Thank you for reaching out Microsoft Community. We're sorry for the inconvenience this may have caused you.
I'd like you to run the system file checker to check if there are corrupted system files that are just looping around causing this kind of issue to exist while it's conned to the dock. To run the system file checker, kindly type CMD on the search box next to the Windows icon and run it as administrator. Once done, type and enter sfc /scannow. Let it load, detect and repair those corrupted files. Whether it detects a corrupted file or whatnot, kindly restart your Surface device and please run the Surface Diagnostic Toolki****t and set the battery performance to recommended.
After running SDT, kindly uninstall/reinstall the display driver in Device Manager.
Open Device Manager
Expand Display Adapter
Right-click on the driver available and select "uninstall device". Please leave the box unchecked if a pop up shows up before you can uninstall the driver successfully. Once done, kindly restart your Surface device to reinstall the driver automatically and please clear the display cache by follow Solution #5 from this link>>https://support.microsoft.com/en-us/help/4023496/surface-troubleshoot-connecting-to-a-second-screen. Then, disconnect/reconnect the monitors and the Surface from dock and check if this helps.
If this answers your question, feel free to mark this post as an answer. Otherwise, don't hesitate to respond to this thread if you need further assistance.
Kind Regards,
Crest_Z