Will the Boolean equation change when we reduce the CMOS transistors in a static CMOS logic?
Sure it does. An unsimplified boolean expression has redundant operations hidden inside it. If you implement that unsimplified boolean expression, then you will have extra logic gates/transistors implementing those redundant operations.
If you did things correctly, the end result doesn't change, but the path to get there does.

the Boolean equation has nothing to do with the transistors but just the logic to be implemented.

The boolean equation is used to pick the logic gates, and the logic gates are made of transistors.