There's php config, webserver config (apache or nginx usually), web files and database.
I run a script to delete these 4 and reinstall numerous times without issue. So perhaps you should look into the two config files, though that doesn't make much sense for the exact issue you're having.
My guess is this is something to do with XAMPP, or you are not truly deleting all files as you think you are.