If they are on opposite tacks with the stbd boat heading into a lee shore then it is not the starboard boat running anyone aground.So a starboard tack boat can run another boat aground?
The port tack boat no longer has a continuous obstruction it needs to manoeuvre to avoid. It has basically no rights. It does however have options. It can stall the boat, duck the stbd boat, or tack.
If it chooses to tack, it now has an obstruction to avoid, but the boat required to give room only has to do so if it is able (and hailed for room to tack) So if you tack under a stream of stbd tackers, and coordination of that stream means they can't get clear in time, yes they can run you right into that lee shore.
Room to tack is just that, room to tack and nothing more.
There is nothing in the rules that says you have to predict what will happen next, only what is happening now. The only obstruction the port tack boat has to avoid in the now, is the stbd tack boat.