When to throw in the towel

I’ve been writing and querying for agents for years. Right now I’m querying a project that has gone through multiple beta reads, has been professionally edited, and I’ve gone through many rounds of query letters. Today I got my 105 rejection for this project after they spent about 9 months with the full manuscript. The project went to full with four agencies and all turned it down for differing reasons.

At what point do you just throw in the towel and stop querying? It feels like there is no hope or headway for traditional publication.

*edit: I did not expect to get responses and goodness am I grateful for the encouragement. This is my sixth novel, fourth I’m querying. The feedback I’ve gotten is that the content is either too niche (queer crime fiction) or that there wasn’t enough connection with the voice or that the house wasn’t publishing in that direction.