No you misunderstand me. I get the reason and everything, what i hate about it is that one scene destroys the rules of the magic.
If a force ghost can lightning a tree, then surely they could lightning people, or interact further with the real world, still impacting it while dead. Its a serious issue, because at any point in time, in theory ghost yoda could show up and lightning a bad guy. It becomes a flaw in the same way that the hobbits could have just used the eagles to throw the ring into mount doom. Now there is plenty of explanation in other lore why not, but you shouldn’t have to rely on written lore for a movie, you just shouldn’t make dumb mistakes for the cause of dramatic effect.
The interaction between them, the advice, the reminder that Luke still wasn’t thinking about the right things, yoda’s double speak that she has everything with her that she needs - the dialogue was great. The bonking was great too, because it didn’t need to actually be physical, just his ghost doing it, and luke’s muscle memory of corporeal yoda doing it would be enough to cause Luke to react to it.
Again, what I have issue with, is that a ghost can summon lightning. It represents so much more than ghostly advice or encouragement which was seen previously.