InstancedMesh Vertex Shader custom animation normals not looking correct

Hi awesome humans,


I am using IsntancedMesh to create a cube of cubes, applied MeshStandard material and in onBeforeCompile i am modifying vertex shader to animate some cubes, but it feels like my light setup is not responding to vertex animation well, it looks like light is baked on the cube surface and if i rotate some cubes, highlighted areas are rotated together with the instance, see GIF image:


I have a feeling it has something to do with normals, but do not understand where to look for the solution.

here is the code i am using in the vertex shader to rotate row of cubes

vec3 axis = vec3(1.0, 0.0, 0.0);
if (a_id <25.0) {
pos = rotate(pos, axis, (u_time)*.6);