I have exact same problem, same hardware, same macOS with you.I think this problem might be hardware or macOS issue.I have 2 iMacs and MBP 13" 2019 (4 ports), This problem only occurs at MBP 2019 (13")For me, hiding grid (context menu > displays > hide girds) will temprorarily removes this problem. Move the Xcode window to sidecar or other external monitor, This problem will be gone also.I've tested this issue with other MBP 13" 2019 (2 ports, My co-workers's one), The problem was reprodcued.So I think this is a Display issue.