As indicated in a previous post, a sometimes discussed grace period is not in Apple's official documentation, therefore it is up to the person if they wish to risk losing the photos.
Each Apple ID person has their own 5 GB of storage. In this case the simple solution is for the person leaving to subscribe to a higher level of storage before leaving the family group. Even if you are in a family group you can have an individual subscription as well. Apple usually just cancels it when you join a family since it normally doesn't make sense to have one.
Upgrade to iCloud+ - Apple Support
More information:
Share iCloud+ with your family - Apple Support
What happens to your iCloud storage when you sign up for Apple One - Apple Support
The document describes various scenarios, including ones where you may have two subscriptions going at the same time.