That sounds really odd to me, Unlicensed in one Site but licensed in another.
What licensing model do you use for the Tableau Server, user-based or core-based?
It's a core-based.
Is there a query to query the unlicensed users in the server and that can much what is being displayed in the browser at the users tab at the server level?
You're probably going to want to look at the system_users table rather than the site_users table. The number listed in the UI for unlicensed users at the Server level should only count the total number of users who are unlicensed across all sites. If a user is licensed on at least one site, they will not be counted as unlicensed at the Server level.
The Data Dictionary has some more information.