I've experienced something like that as well. Depending on what you can do, try a different monitor and/or different cable and/or different dongle. I've managed to find a combination that doesn't do that anymore.
I have my problem with OWC TB3 dock and Dell P2715Q. I will try an older dock that I have in the office (Kanex TB2 Express; as the name says, it is TB2, thus extra dongle needed); but playing around with different TB docks can get expensive...
It also does not happen with Intel Macs, which use Intel TB implementation. With M1, the TB is brand new, so some issues are to be expected. I suspect that with sleep and wakeup, there is some state mixup with previous link training, so it doesn't talk to other side the way the other side expects. This might be - or might be not - fixed with firmware updates.