Prevent shutdown or disable shutdown button only for RDP

Run Secpol.msc to launch Local Security Policy.

2.    Navigate to Security Settings\Local Policies\User Rights Assignment\Shut down the system.

3.    Remove the users or groups that you want to restrict