Rotating mesh via material - messed up lighting

Hi!

Recently I have tried to create material that will rotate my mesh to ease up usage of resources in my simple platformer game.

I managed to create such a shader but for some reason lighting is messed up.
I tried to add code to fix normals but for some reason issue still prevails.

Questions are:

  1. Is material graph correct and I don’t understand that it works as intended?
  2. If it is wrong - what extra nodes need to be added in order to fix the issue?

Thanks in advance for response!

Below I attached short video with results and material graph