Hi @Ziyad Tbeni ,
I am not aware of such a policy to configure what type of users (local / domain) are allowed to logon to a Windows Operating System based on the network configuration of the OS.
Why would you need this in the first place?
Theoretically, when your PC is connected to the corporate network, you will logon with an Active Directory (domain) User Account.
Then, when the same PC is disconnected from the corporate network, you will still be able to logon with any Active Directory (domain) User Account that was logged on previously on the PC (as the info is cached locally on the OS).
Either way, if you really need the Domain User only when connected and Local User only when not connected, you could build a PowerShell script that checks the user and network info at every logon, then based on your criteria could just perform a logoff automatically if the user is not the expected type.
I hope this helps!
BR,
George
Note: please "Accept the answer" if this helps you.