if you use push pop it does not,
the rot is a single property of each object
i set by a random ? you see ?
you change that, or disable that
and better write a animation script
where you get lost is when you rotate from the wrong center…
so the change
rectMode(CENTER);
push
translate(x,y)
rotate( angle )
rect(0,0…
pop
is the easy way