The solution to that is mutation tests. They force your tests to actually verify the implementation instead of just running the code to fake coverage.
https://en.m.wikipedia.org/wiki/Mutation_testing
Tools and frameworks exist for almost all languages.
Some examples:
- stryker-mutator (C#, Typescript)
- pitest (Java)
- mutatest (Python)