I would probably set a X number of notifications in advance depending what is the frequency of user getting in app and trigger a mechanism when the app is foreground to check the notifications which are not yet delivered.
the mechanism will clean the ones not in line anymore (if you have a deviation or notification time and set back again X number or notifications).
It might not be the best optimized strategy.
You might also have check the expo notification documentation which might help you https://docs.expo.dev/versions/latest/sdk/notifications/
Br