hamedkouhfallah I suppose you are talking about some user avatars returning 404 erros. Can you check if the images are still on the disk ?
There's usually no reason for Flarum to delete them unless the user remove or change their avatar. Maybe a script (or user?) on your server is doing some cleaning ? What kind of hosting are you using ?