You can put the upper on a rest or in a vise, pull the BCG and look down the barrel at a distant object. Without disturbing the upper, zero the optic to the object. This will get you on paper at 25 yards and you can shoot 3 rounds to verify. I don’t trust laser boresights.
Having several eye problems, cataracts ( which will be addressed early next year), thousands of floaters( due to detached viterous humor in both eyes) and astigmatism I have trouble looking down a bore. I recentlly put a Leupold scout scope on an old Swedish M 96 Mauser and used a laser bore sighter. When I first fired it, the windeage was off by about 1 1/4 inches at 50 yards. I'll stick with my laser sighter. I also put a red dot on a little Sig P365 XL, a micro 9mm. Clamped the gun in a vise, and then adjusted the red dot to the laser spot. I'm happy if a laser gets me close, saves ammo, they are not perfect. The one I have attaches to the muzzle by a magnet so it is easy to rotate it to see if there is any variance in the dot position. My thinking it is better on a fixed barrel like a rifle or revolver than a pistol with a tilting barrel lockup, but still better than nothing. You simply cannot look down the barrel on most semi auto pistols, and revolvers are not easy with a small mirror.