It does this because the ship you're currently is, is the closest one (distance 0.0 meters). So it targets the person who's in it.
Seems if the ship you're in gets excluded for the "Select Nearest Entity" button that it should be fixed.
{F6139, size =full}