The problem is simple. If the police stops you for having a blade longer than 3” you can argue your case in which case there are 2 possibilities:
-they recognise their error
-they don’t
In the latter case you can refuse to leave them your knife, go to the police station and speak with the Desk Sargeant, and repeat the process, with the same alternative.
The next step, assuming the CPS wants to take up your case, is to argue your case. You will most probably win, except if you were acting stupid in the first place and this was the reason for the initial search that led to the discovery.
Then the question becomes: how much time are you prepared to waste ( the chances of this scenario happening are extremely remote, but you asked).