I’m still asking this question and not finding any answers.
Someone said to disable Touch ID on the iPad. That didn’t help.
Someone said to be sure you’re using a USB connection, not a wireless connection. That didn’t help either.
Here’s my current theory, which I am still testing, and I’ll update this if I get anywhere closer to confirming it.
I think it may be because I was supplementing my WiFi Internet connection with a wired Ethernet connection, via an Ethernet-to-USB-C adapter. Most of the time when I’m sitting at my desk — which is also almost the only time I’m ever using Sidecar — I have the Ethernet plugged in. I have “gigabit” (in theory) fiber Internet, so the wired connection makes the difference between averaging about 150 Mbps over WiFi alone vs. about 600 Mbps over WiFi + Ethernet.
I’m not exactly sure how the Mac handles having both WiFi and Ethernet connected simultaneously… I’m from the old school where you had one or the other. But it seems to work. However, I think it may also be contributing to Sidecar crapping out randomly and often (usually it won’t work for more than about 5-10 minutes before the iPad screen freezes).
So far in about a half hour of testing deliberately having the Ethernet unplugged and paying attention to it, Sidecar has managed not to stop working, but it’s too soon yet to know for sure if this is the fix.
I’d rather keep my fast Ethernet connection, of course, but my WiFi connection is plenty fast for everything besides massive file transfers, which I don’t really do that often. So if this is the tradeoff I need to make in order to keep Sidecar working, I’ll do it.
Update (June 7, 2022): Nope, this seems to be a moving target. The solution I outlined above worked for a while, but now, still running the latest OS updates (macOS 12.4 and iPadOS 15.5 respectively), I am still once again seeing Sidecar freeze every 5-10 minutes, even though I am doing everything I can possibly think of to fix the issue: the devices are connected over USB, I have Touch ID disabled, auto-lock is set to “never,” my Mac is unplugged from Ethernet. None of it matters… Sidecar just keeps freezing. I don’t understand why Apple can’t seem to fix (or even acknowledge) this problem.