To automatically sign off inactive Remote Desktop Users in Windows, use Group Policy Editor, Remote Desktop Session Host Configuration, RDS Collection settings, etc.
RDP is really useful, but the default setup has no place on the public-facing internet.