When you have priority resolution enabled on a repository that is under a virtual repository, requests made to that virtual repository will then search for the locals and remotes underneath that repository with priority resolution enabled first.
Therefore when a request is made to a virtual it will first search through all the repositories under that virtual with priority resolution enabled for that package name and then merge the metadata from all those packages without going onto the repositories without priority resolution(provided it has found a package with that name). If no repos with priority resolution enabled have any versions of that package, then it will return merged metadata from the rest of the repositories without priority resolution enabled.
The important thing to keep in mind is that metadata requests for many package types returns all versions for a package. Therefore if there are packages in two different repositories that share the same name but different versions and only one repository has priority resolution enabled it is possible that artifactory will not return the expected versions as priority resolution will check and merge the versions of that package from repos with priority resolution first.
In general it is not considered best practice to keep packages with the same names in separate repositories but if it cannot be avoided then you should make sure both those repositories’ priority resolution settings match if they are under a virtual.