I have a similar issue. MacBook Air M1 chip (8-core CPU, 7-core GPU, 16GB memory, 512GB). My monitor is Dell S3221QS, 4K, 32" curved monitor.
Connection through Display Port (QGeem USB C to Displayport Cable 6ft 4K@60Hz): it displays at 60Hz but monitor goes black every 10 seconds, so it's not useable at all. It displays fine at 50Hz. Apple support couldn't find a solution thus far. They asked me to see if Dell has a firmware update. They don't. At 50Hz, mouse movement is shaky, erratic. I am using Logitech MX Ergo over Bluetooth.
Additionally, when MBA is not connected to power, when I close the lid, no DP signal detected and monitor is black. When I connect to power, the issue goes away.
Connection through HDMI (over Anker Hub PowerExpand 8-in-1 USB-C PD 10Gbps Data Hub, Model A 8383). I get 60Hz refresh rate. But the monitor goes black every now and then for a few seconds. What's worse is when I unplug to use MBA by itself, then come back to replug, the monitor is not detected at all, at random. Sometimes it works.
And HDMI connection only works when I plug in Anker directly to MBA. If I use an USB-C male/female extension cable (1.8ft), the monitor is not detected at all.
I will call Apple again. In the meantime, any suggestions welcome.