Per my knowledge, in the SharePoint, it's by designed that when using Python or Graph, you could only through user ID in the site collection user information list to update a person column. But when using UI, you could choose all users in the tenant to update a person column.
First, query site collection user information list to get user ID.
https://graph.microsoft.com/v1.0/sites/{site collection guid}/lists/{user info list guid}/items?$select=Fields&$filter=Fields/Title eq 'User Display name'&$expand=Fields
Then, use Python or Graph to update a person column.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.