Waymo already warns you if it detects road users when you open a door. They just don't actively prevent you from opening the door, but they could implement it in their next generation vehicles.
> Dooring people aside, what do you do if someone just leaves the door open when they leave their ride?!
Continue billing them for the ride and send an app notification or phone-call to their phone.
Other potential solutions: If the door is still not closed after n minutes, plead with passers-by, or offer a passing or nearby rider the chance to earn credit by closing the door.