Desolate Land behaved strangely

Groudon’s Desolate Land didn’t block Surf one time, but did block it another. What happened?

Probably just a bug. Kinda like my Shadow force when fighting any sylveon it takes its PP then it fails.