Open the paper config file. You can either do this via SFTP or via the panels web file browser. For 1.19+ Servers: /config/paper-world-defaults.yml For 1.18 and before: /paper.yml
Find the anti-xray line. (for 1.19+: around Line 18, for 1.18 and before: around Line 262) Set it to true.
In the same file you can also set the engine-mode. Engine Mode 1 is more performent but Engine Mode 2 potentially prevents Xray better. You can find more detailed information in the Paper Docs.