In Iran, the nuclear program has long been a point of consensus across the country's political spectrum, among both hard-liners and moderates. Being a nuclear power is a matter of survival for the ruling clerics.
They didn't endure four rounds of sanctions and decades of isolation only to surrender their nuclear program. From their perspective, having nuclear capabilities will not only support their regional hegemonic ambitions but will also ensure their hold on power domestically.
The problem is that the Iranian regime is viewed as a modern nation-state that plays by the West's international rules and standards. It might be time to take a closer look at the clerics' fundamental principles and the political structure of the Iranian regime.