I have the same problem. I have a keyboard, mouse, and webcam connected to each of the ports, and it randomly stops working. It seems pretty clear that this issue cuts off the data transfer but not the power.
As an example, I was on google meet with my webcam turned on. Suddenly my camera stopped, but the 'camera on' indicator on the webcam was still lit up. Additionally, my keyboard, which was connected to the display with USB cable, was charging, but did not transfer any inputs.
The fix to this problem is to turn off the display and then turn it back on (whether by cutting off the power or disconnecting the thunderbolt cable to mac). This has been such a hassle since this occurs multiple times a day.
I am actually very surprised you raised this issue. I thought I was a one-off with bad hardware, because I talked with a few 'experts' at Apple Support, and they had no clue. They suspected that the thunderbolt cable could be an issue and sent me a new one, but didn't help. They then suggested that I bring my monitor to the apple store, but I haven't yet because it's a hassle.
I hope they take this seriously and address the issue given that it's a $5000 monitor.