Vivado Artix-7 Ignoring my code
What is happening is perfectly normal.

When you write in HDL you are... Describing hardware, either its behavior or its implementation.

If you do not set the flag as output, could you tell the difference between two fpgas, one having all the shift registers, the other one lacking them? No.

And you are so lucky to have a synthesizer smart enough to optimize away your useless (as in producing no visible effect from the outside) code.

I think you can force the code to be included, but that would be pointless since you would not have any way of testing it. Either you start simulating, which is a Very Good Thing\$^\text{TM}\$, or you keep the flag as an output and live with it.