How should the law distinguish between consensual relationships and criminal acts in sensitive cases?

The Supreme Court quashed an FIR alleging rape, calling it a classic case of a consensual relationship turning acrimonious. I want to understand how legal systems can balance protection for victims with safeguards against misuse.