The people picker retrieves data from multiple sources: User Information List and Active Directory.
So even you disable uses in the Active Directory, disabled users will still appear in the people picker.
I don’t think it’s possible to restrict disabled user accounts in the people picker.
If an Answer 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.