A hostile boarding action would be almost impossible. And when possible, extremely expensive.
All of those die rolls necessary "to hit" are designed for fleeting ships 1000's of kilometers apart in deep space, not matching vectors in contact distance. Lasers, for example, are mostly modeled as "shooting lots of shots over time somewhere around where the ship at XXXXX km hoping some of the laser blasts, ANY of the laser blasts, hit the target ship". If that laser is alive and well as something is up and trying to park mere meters away, it's going to get drilled well, over and over again. "Here comes the gig!" "Point this red line thing at that gig thing until it pops."
So, any offensive weapons must be disabled first. Otherwise, the target vessel will get lots and lots of "free hits" on the attacker.
Next, the actual assault.
The actual assault is likely to be bloody against a prepared defender. The attacker has to cut a hole in the hull -- somewhere, somehow. That could be at an airlock, or…it could not. I don't know if an outer hatch or cargo door is or is not easier to penetrate. If it's mostly the same, then any hole anywhere will do, no reason to go for the hatch and have a battle ala Star Wars with everyone standing in corridors.
Then it's a question of ship knowledge (i.e. know where to open a hole) -- nice thing about the hatch is you have a reasonable idea what's behind it -- an airlock tied to a corridor vs a random stateroom or fuel tank. It's also a question of whether the attacker has any tactical surprise (can the defender see on the hull where the attacker is breaching)? Also a matter of how many teams are breaching at once.
Consider to different representations in popular film of this kind of action. The first, is "U-571".
The other, is "Heat".
Now, in contrast, looking at modern East African pirates, where they attack mostly unarmed ships, they use the gunmen on the boats to cover the advance of the assault team as they basically walk up the outer stairs. If there's any gun play, it happens before the actual boarding process. But on a starship, the crew is not exposed to attack like this.
If you have a prepared defender, the corridors of the ship are going to get very messy, very quickly. Close quarters combat in metal boxes filled either with ricocheting bullets and shrapnel, or combatants are just going to shoot through the walls and doors, making a mess of everything. Hand to hand combat with grenades.
The point of this being that a hostile attack very likely WILL prevail. You don't just "beam over a few men" to take a Federation Battle Cruiser. You blow holes in the hull, followed by grenades, pauses, then more grenades, then rushing through corridors to throw yet more grenades. You do this with armored assault teams. You send over enough to do the job, or…you don't bother.
So, because the price is just so blinking expensive, and so difficult, a hostile boarding will very rarely happen. The target vessel will simply be attacked until it is ready to receive boarders, peacefully, through the airlocks without the accompanying explosions and shrapnel.
A ships is capable of resisting boarding if it can make it clear that such an action will be very, very expensive. At that point, the attacker will either leave the ship alone, or just start blasting more holes in to the ship from afar with its ship board weaponry until the ship heaves to and is more amenable to boarding.
But if the crew is a bunch of rogue adventurers with little but a random shotgun and cutlass, having to do combat in vacuum in a vacc suit that actually offers little actual protection, eh, the outcome doesn't look good. Better to take the boarding, eject the cargo, scuttle the ship, or whatever other recourse may be available.
So, this is what makes it rare. if the defender is capable of defending, the attacker is likely not willing to pay the price to take it. If the defender is incapable of defending, then they may as well heave to or do something else. Both cases show little need for an actual hot boarding action of Marines swinging on ropes from ship to ship with knives in their teeth.
Finally, most likely, there is no impasse here. Save, perhaps "saving the Princess", once one ship dominates another, the target ship is a dead duck. In the end, it's "just pull along side of them and keep shooting them until the lights go out -- then we'll wait for the air to run out". "We don't have time to wait for the air to run out." "Oh, ok, just shoot them until the lights go out then. Make large holes in their engineering section, then we'll leave and they can suffocate on their own time. Just point the lasers until you see the red dot on their tail section, then turn the knob to 'extra crispy' and wiggle it around a bit until it's all glowing and broken. And grab a vector, maybe we can come back in a few months and track them down. We'll salvage it then."