A prominent surgeon charged with raping a fellow doctor after he allegedly took his condom off without permission while they were having sex has won a court battle to keep treating patients.

The surgeon, who is also an academic, was arrested and charged by Victoria Police in September 2018 after he was involved in a 2017 incident of "stealthing", the non-consensual removal of a condom, during sex with another male doctor.

Under Victorian law, the non-consensual removal of a condom and continued penetrative sex is classified as rape.

Following the incident, the other doctor raised concerns about being infected with HIV, began to take medication to prevent contracting the disease and asked the surgeon to provide tests verifying his HIV-free status.

Instead, the surgeon, whose named has been suppressed, blocked his calls and texts.