(It wasn't until I wrote him a letter taking ownership for my flaws and mistakes in the marriage that he began to craft his narrative of the controlling and manipulative wife. He turned my desperate insights and honest apologies into weapons, arming himself with reasons he had to leave me. Giving him that letter was probably my biggest mistake in this whole process.)
This exact same thing with letter-writing happened to me. I'm so sorry you had to go through that, I know how painful it is to feel so vulnerable and pour out your feelings onto paper only to have them weaponized. Also my biggest mistake and regret.
When they want out, everything is fuel. There is no doing right. DB often advises a neutral or non-reaction, but sometimes I think there are situations where a complete non-reaction provides them a blank canvas onto which they can project all those negative feelings. Then they can freely paint the picture they want, and then use THAT as fuel. Everything is fuel.
I don't think there is anything wrong with standing up for yourself and disallowing the projection (as you have been doing). It shows that you won't play the same games anymore (gaslighting, projection, whatever it is...) It is a proper boundary.