I've had similar problems on a Pixel 7 (and previously on a Pixel 5).
Try enabling USB debugging and then issuing the following command (if you have android SDK installed):
adb shell dumpsys deviceidle whitelist +com.google.android.apps.messaging
After doing so, SMS messages are consistently...