Onesignal notification not receiving when screen is off(locked)

I have a Ionic 5 Angular application in which i use onesignal to send push notifications. The problem is that when the phone’s screen is off, user is not receving the notifications. Once they unlock their phone, they are receiving all the notification at once.