For investigations, I believe solving the mystery is the mid-point (or the end of act 2) and that what the party does about the answer is the rest of the adventure. So I don’t see a problem with players using their resources and cleverness to overcome obstacles. The cleverer, the better!
But you asked what to do about clever questioning or how you might handle tricky semantics, so there’s a couple things we might establish.
The spell specifies that the affected creature cannot speak a deliberate lie. So we can exclude all statements made with any other motivation from the spell’s effects.
For instance, a statement made under duress may not qualify as a deliberate lie, no matter how far from factual.
Likewise, “repeat after me” situations don’t qualify - the affected creature is not lying when quoting some statement given to them. It is accurately repeating the statement.
Misunderstandings, or not disabusing someone of their incorrect inferences, are also permitted. “If I arrest suspect X, will I arrest the murderer?” Sure, maybe you will. That doesn’t mean suspect X is the murderer. Maybe you’ll arrest both, but I don’t have to correct your assumptions. Or maybe you won’t. I can say Yes or No so long as I am not deliberately lying about it. I may earnestly feel you will never arrest Suspect X, and therefore will never arrest the murderer.
Inaccuracy is likewise permitted. I might have seen the suspect but not have a very accurate estimation of their age, height, weight, or remember in what order events happened. Or I might’ve seen things and yet not understood their meaning. In Much Ado About Nothing, there’s a whole big plot over seeing and hearing an extra-marital affair that never did happen. In My Cousin Vinny, the karate kid says “I shot the clerk?” as a question but it’s transcription in his confession is taken as a statement. So anyone who heard the karate kid say “I shot the clerk” can truthfully repeat that’s what they heard him say.
The spell also specifies that the affected creature cannot SPEAK a deliberate lie. It says nothing about nodding affirmatively or shaking the head negatively, and nothing about any other gestures or writing, either. (If we’re playing this as semantically nit picky as possible lol). When asked whodunnit, I can say “He did it” and point, gesture, or nod in any direction I please.
And how about an accidental or inadvertent lie? Sometimes I say something but use the wrong word. Or can’t think of the right words and end up saying something else. Or a homonym.
In truth, I don’t think I’d ever use these myself. This is needless parsing of spell verbiage, to me. I’d rather see the spell as a gate to the end of act 2 rather than look for attempts to tax it and draw the scene out any longer. With a single exception. If you’re doing a Clarice interviews Hannibal scene, that’s worth some extra time. Questioning disposable NPCs who will never recur and are just features of the obstacle is not worth the sparring.