Hello @unknown_25 ,
By default, all the users(including deleted users) are stored in a list called user information list in your site. When we use csom get users, it would get the uses form that user infomation list.
You could remove the deleted users from that list to avoid this. The url of the list is: httpss://yoursite/_layouts/15/people.aspx?MembershipGroupId=0
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.