What is the name of this phenomenon (related to assumption of guilt)?

Person A firmly believes Person B is guilty of some thing, and accuses them in no uncertain terms.

Person B (who is actually innocent) protests their innocence.

Person A regards this protest as further proof of guilt: ‘You wouldn’t be so quick and vigorous to deny it unless you were guilty, or had something to hide’, says A

Person B further explains how the accusation is not, and cannot be true.

Person A responds to the effect ‘You’re protesting too much/digging yourself deeper. It’s obvious you’re guilty.’

In this scenario, B is innocent, but the structure of A’s belief does not permit any way to accept that.
What is this phenomenon called? (I think psychologists have a name for it, but it’s eluding me).

It’s the Kafka Trap logical fallacy.

“Methinks the lady doth protest too much…”
-Shakespeare.

“I’m not the messiah!”
“They say only the true messiah will deny his divinity.”
“All right then, I am the messiah.”
“He is the messiah, he is the messiah!”
-Monty Python’s Life of Brian

It’s also a trademark behavior of psychiatrization.

“You’re mentally ill. Your thoughts are all disturbed because your brain isn’t working right”

“Umm, no, I make sense to myself, not hurting anyone, self included, and I like who and how I am”.

“See, that proves you’re mentally ill! You’re so sick you can’t even realize how sick you are!”

The very epitomy of Joseph Heller’s Catch-22 as well:

“There was only one catch and that was Catch-22, which specified that a concern for one’s safety in the face of dangers that were real and immediate was the process of a rational mind. Orr was crazy and could be grounded. All he had to do was ask; and as soon as he did, he would no longer be crazy and would have to fly more missions. Orr would be crazy to fly more missions and sane if he didn’t, but if he were sane he had to fly them. If he flew them he was crazy and didn’t have to, but if he didn’t want to he was sane and had to. Yossarian was moved very deeply by the absolute simplicity of this clause of Catch-22 and let out a respectful whistle.”

Perhaps to a certain extent, we are thinking of a variation of people assuming the person is suffering from Dunning-Kruger effect. They overestimate their own wellness.

The solution to Catch-22 was what we would see as the “Klinger” approach. Like the character in MASH you act out and hope someone else reaches that diagnosis on your behalf. Which invites a Reverse 22, where everyone realizes what you are trying to do and won’t be drawn into it.