Maybe OP needs to consider doing mock interviews or something to figure out what it is that’s going wrong? I’m a good interviewee and got the first job I applied for.
Maybe you worked at the same place for a long time and developed bad habits? Maybe you’re bad at selling yourself?
I once interviewed someone who said he was a team lead at a company for six years. He straight up made up answers to some of the technical questions. It was horrifying. I’m not saying that’s OP but he definitely needs an objective voice to step in and figure out what the malfunction is in the interview process. Maybe ask a friend in tech to perform a mock interview? They can feel silly but also can really help.
Otherwise, everyone I know struggles. Interviews are now involving more and more esoteric questions about things that aren't even on my resume, and sometimes questions about tools that can only be answered if you memorized the entire 1000 page handbook of the tool.
I have been asked questions about things that were tangentially mentioned in my undergrad in a lecture 10 years ago, and I never used anything close to it in my job.
Leetcode hazing varies from place to place. If they insist on the most efficient solution, mostly you are fucked unless you live and breathe algos.
The only silver lining is dynamic programming questions have died out, probably because Meta stopped asking them.