Yes, you can just declare that. But there's no way to actualy make that a feature of the geography and not just an arbitrary declaration of the GM.
Also, it's basically impossible for that to be the case unless the world is inside the sun's jumpshadow, which is already a thing unrelated to the straight line. Because if I just need to jump to escape and the GM tells me "Oops, the Sun is directly between you and Alpha Centauri, I'll just figure out which of Neptune, Uranus, or some ice asteroid out around Pluto is not blocked and jump there. Yes, you could then be like 'Ooh, they have the jump tracking fancy devices and they'll just radio ahead'. All fine if you do the work to establish this stuff in advance but there is no methodology to bring it into play.
Mechanics that the player can't actually use proactively and just exist as GM gotchas are kind of meh to my mind.
Also, it's basically impossible for that to be the case unless the world is inside the sun's jumpshadow, which is already a thing unrelated to the straight line. Because if I just need to jump to escape and the GM tells me "Oops, the Sun is directly between you and Alpha Centauri, I'll just figure out which of Neptune, Uranus, or some ice asteroid out around Pluto is not blocked and jump there. Yes, you could then be like 'Ooh, they have the jump tracking fancy devices and they'll just radio ahead'. All fine if you do the work to establish this stuff in advance but there is no methodology to bring it into play.
Mechanics that the player can't actually use proactively and just exist as GM gotchas are kind of meh to my mind.