It seems that your tenant has a Conditional Access Policy that applied to different locations. Please confirm with your tenant admin about this.
For reference, you can learn more about conditional access by this article: https://learn.microsoft.com/en-us/azure/active-directory/conditional-access/overview.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.