First, we apologize for the inconvenience as there is a bug found in Power Delivery where it will disconnect the hub from MacBook after wake up from sleep mode. It affects only the M1 and M2 series MacBooks, and users have to replug the hub to regain the connectivity.
We're currently working with the IC supplier for a firmware update solution and will post an update here as soon as possible.
However, there is a work around solution till the new firmware is available.
Go to Settings > Display > Advanced > Switch ON the "Prevent automatic sleeping on power adapter when display is off". Although it is not a perfect solution, it can keep the connection stay on after sleep mode.