How to prevent Quartus RTL Viewer from optimizing my Verilog code?
No, there isn't a way of stopping the gate reduction.

It's not optimisation, as it's an integral part of how Quartus interprets an HDL design and reduced to boolean equations during synthesis.