You have to be harsh, otherwise nobody gets to play. When we started our new group we made sure to inform everyone that playing DnD is not to be treated as a secondary hobby that can just be canceled for other stuff all the time. Make it your priority, plan other things around the sessions if you want to play with that group. Of course, any emergencies excluded but otherwise treat it as if it is your sport club training. If you miss too many sessions, you're out.
I know this sounds super arrogant and mean, but it's the only thing that works consistently. Also filters out friends who are not ready or able to commit that much time for playing.
This is the double standard I hate so much about violence / porn / swearing.
Kids are watching ultra violent game streams? No one gives a shit.
The second a bad word has been said on a stream or a bit of nudity is shown, people are losing their god damn minds.