Hi. Thank you for your question and reaching out. I’d be more than happy to help you with your query
You can actually use your firewall with the advanced security so it can block the connection request for RPC. This ill help to prevent detecting the services with the scanner. And also, make sure that you have the latest security patches and has the latest version for Windows Server 2019. And make sure that you only have enabled all the necessary services and all the unnecessary services should be disabled.
If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.