If that's how it really is in Showdown then that is wrong. I have proof that it hits defense if using your attack in the game.
Starting at 1:48:30 in that video we see that Necrozma deals so much less damage to Stakataka with Photon Geyser and Light That Burns The Sky than with Moongeist Beam...