Problem with github revoking my personal access token

I’m using personal access token in my react page by Github pages. I put the token in .env and .env in .gitignore but then after deploying (using npm run deploy) GitHub revokes my token because it is publicly available! Even I added Secrets to my repo using the generated token but still nothing! I also need to mention that it was totally fine until 5 hours ago! (with secret and .gitignore) but now is not! I would appreciate any help, tip, or guidance. Thanks