Are you using WiFi? if yes, test with Ethernet connection instead.
And you need to make sure your network connection isn't bandwidth constrained. And that you don't have background processes running on your PC causing a conflict. Personally, I found Windows sleep to be so unreliable over decades that I almost never use it. at all. period. Have you rebooted recently? made sure unnecessary background process (like Edge, Office, etc) turned off
Then if still having an issue, follow pinned post in this forum for asking for help/support (like posting your OBS Studio log from a streaming/recording session)