Not exactly. They would be subject to the inverse square law of being weakened by distance unless they had absolutely zero spread, at least. We don't know whether a phaser or disruptor beam has non-zero spread in general, but we have seen some phaser beams with lots of seemingly unnecessary spread. Say, this weak beam from "Return to Grace", clearly growing wider with distance:

Since Dukat in that episode would have had no reason to command a spread for his beam, we might assume that poor-quality beams (such as the one specified here) spread a lot, and excellent-quality ones spread a little.

There might be other factors weakening the beam at a distance, too. The beam glows in every direction, meaning it loses some energy for each millimeter it travels, unlike a laser in vacuum. How soon does the energy loss from the glow add up to a noticeable weakening of the destructive effect?

Also, phasers and the like often need to travel faster than light to reach distant targets. The means of enabling this are unknown but probably involve the classic technobabble conceit, a subspace field. If this field "leaks", then there is power loss from that, too. Some sort of a containment field "jacket" may be part of very slow beams, too (and a deliberate removal of the "jacket" would explain the fragmentation effect or "proximity blast detonation" witnessed in TOS "Balance of Terror"), and may again be a cause of leaks - or even of energy drain, as the field might be maintained by siphoning off energy from the destructive qualities of the beam.