Gregory Doran is not the first director to set this dark comedy in early 1900s Vienna. But it’s a decision that makes total sense since the initial image of a glittering waltz-time world gives way to a portrait of public hypocrisy, seething sexuality and a fierce contest between the spiritual and the secular. It is easily the best Shakespeare production of the Stratford summer.

The setting gives the secondary characters unusual definition: Joseph Arkley’s Lucio is a dapper seducer who might have stepped out of a Schnitzler novella and Claire Price’s gender-switched Escalus becomes the embodiment of rectitude in a corrupt society. But the play hinges on Angelo’s offer to save the life of Isabella’s brother in exchange for her body, which here comes across with exceptional clarity. Sandy Grierson’s Angelo is a figure filled with Freudian repression who secretly scourges himself, while Lucy Phelps’s Isabella is a woman of determined reason and implacable faith who, at one point, forces Angelo to join her in prayer.

Implacable faith … Lucy Phelps and Sophie Khan Levy in Measure for Measure. Photograph: Helen Maybanks

Yet the moment that is still shocking is when the novice nun, threatening to go public with Angelo’s sexual bargain, is asked: “Who will believe thee, Isabel?” The Duke remains the most problematic character, but Antony Byrne plays him convincingly as a man who, having temporarily abandoned power, finds himself secretly addicted to it.

Byrne also gives unusual weight to the idea that, when it comes to women, the Duke “was not inclined that way”. The hint that he is a closeted figure makes his climactic marriage proposal, which leaves Phelps’s Isabella understandably aghast, seem all the more cynical.

That, however, is only one of many telling details in an assured production in which there are no half measures.

• At Royal Shakespeare theatre, Stratford-upon-Avon, until 29 August. Then touring.