Microsoft Azure does not offer the same support for Windows Server 2012 R2 as it does for Windows Server 2019. Specifically, Windows Server 2012 R2 will reach the end of support on October 10, 2023, meaning it will no longer receive security updates, non-security updates, bug fixes, or technical support after that date. In contrast, Windows Server 2019 is still supported and receives regular updates and security enhancements.
Regarding security, Windows Server 2019 includes improved security features compared to Windows Server 2012 R2, making it generally more secure. For example, Windows Server 2019 has enhancements in Windows Defender Application Control and Security with Software Defined Networking (SDN).
As for Microsoft Dynamics NAV 2016 installed on Windows Server 2019, Azure supports Windows Server 2019, which means that Dynamics NAV 2016 should also be supported when running on this version of Windows Server.
References: