Microsoft 365 will not behave differently simply because you use a VPN.
But there are situations where you might be working remotely through a VPN and find that you need to access Microsoft 365 applications. In other words, Microsoft 365 is hosted remotely.
Microsoft 365 is centrally hosted in the cloud, so you don’t need to have any server running run it locally (on-premises). The main advantage of Microsoft 365 is the ability to access Office applications such as Outlook, OneDrive, Skype for Business, and SharePoint regardless of whether you’re directly connected to your organization’s network infrastructure.