Spaceships in Star Wars frequently use energy weapons for combat. Given that Sir Isaac Newton is the deadliest SOB in space, I was wondering if this also applies to the non-kinetic space weapons used in Star Wars. Do they have a maximum range after which the shot dissipates, or do they veer off into deep space and possibly hit some unlucky sod several millennia later?
Yes, in canon, the weapons have a maximum range. As demonstrated in this discussion talking about some of the dialog from the first movie, A New Hope, Han makes the comment that the TIE fighter is "almost in range" as they pursue it towards what they later discover is the Death Star. It's clear from the view through the cockpit that the range is fairly short for the weapons the Millennium Falcon was carrying. If you go by the math in the discussion, the TIE fighter was only about 300 meters ahead of the Falcon, making it a very short distance.
The next movie, The Empire Strikes Back, also makes it clear that the weapons from a capital ship like a star destroyer have a much greater range. The discussion on the same page as above discusses a sequence where two destroyers are coming at the Falcon. From their math, a maximum weapons range is at least 75 kilometers, possibly over 135 km, though an effective range would be much less against a small, fast moving target like the Falcon.
From the same movie, it is clear that a ground based energy weapon can have a much greater range and effectiveness, as the rebel ion cannon fires from their ground base and disables star destroyers in orbit around Hoth. Even a conservative estimate of how high those star destroyers would be orbiting would place that range at greater than 1000 kilometers if they were in a fairly low orbit around the planet. A more likely figure would be closer to 5000 km from the ground to their positions.
So, yes, from canon we can determine that energy weapons have a maximum range, and that the range varies based on the source of the weapon.
As a side note in comparison, in the X-Wing series of video games (which was of dubious canon state even before the Legends), the maximum range for energy weapons from fighters and small freighters like the Falcon is 1.5 kilometers distance, at which point their energy has dissipated enough to no longer be viable.
All beams over a given distance will lose focus. While the advanced technology may allow that to be a very large distance, there would still be a physical limitation as quantum mechanics will stop the physical device from being able to focus past a certain point. So like a magnifying glass the non-kinetic weapons need a strong focal point. You usually cannot set alight unless you have a very narrow beam.
Additionally while space is usually considered empty this is only mostly true and over a distance the beam would deteriorate interacting with radiation and background particles.
This means that the non-kinetic will keep going until it hits but will slowly disperse to have a weaker and weaker effect over a large enough distance. So while there is no actual hard limit range, you could probably apply an 'effective' range to these types of weapons.
Note: This question is based mostly of my understanding of physics and am unaware of any in-universe factors that would change this answer.