This is an Android feature to save battery it will not prevent phone calls and text messages from coming through if you'd like to receive notifications from other apps while you are sleeping, which I don't understand why you would necessarily, you can make them a higher priority... Personally I like the feature as I don't get Disturbed in the middle of the night and as soon as I wake up and grab my phone it catches up on everything and that's perfectly fine with me
The OP did not say anything about when they are asleep. It's the phone going into sleep mode.
Try looking at the battery optimization settings. This is the instructions for the S8, but it should work for the Note as well.
1: go into settings, search for "apps" and click into it.
2: once inside "apps," hit the three dots on the upper right corner, go into "special access."
3: once inside special access, go to "optimize battery usage."
4: from here, tap on the dropdown menu saying that says "apps not optimized" and switch to "all apps."
5: once all your phone's apps are shown, find the apps you want to receive notifications as they come through, and tap on the switch to turn it off.
These instructions are from a Forbes article. Also, if this doesn't work, I've read suggestions about making sure that wifi is off when the phone is sleeping. You can find that setting in the Advanced section of your wifi settings.