As long as someone observes the Earth, it will be possible to detect such a laser in another galaxy. In fact, no one has ever made such a powerful laser, but you can even configure the current laser to view the radiation as an observer at one-third of the galaxy's distant stars.
New research precisely investigates this aspect of laser interstellar signals. It is talking about a 1-2 megawatt laser beam focused on the radius of a 30-45 meter telescope. And one technology and other technologies do not yet exist, but they will be real in the next five years. Such a system would allow the detectable signal to travel 6 kilobytes, which is three-quarters of the distance from us to the galactic center.
Signals can be extracted to cover critical areas of stars, so it is not necessary to apply them to certain alien planets, so sending a signal to a star is sufficient. This signal can theoretically contact other civilizations for tens or centuries depending on their distance from the planet.
In addition, lasers can act as megabit data rate channels per second, allowing them to communicate with extraterrestrial civilizations. Of course, only if there is such a civilization nearby.
The results are published in the Astrophysical Journal.