It wasn’t just muslim hardliners who brought down the Shah, it was a coalition of muslims and socialist/communist students.
The muslims were just smart enough to be go after the socialists as soon as they got power, knowing they would be rivals for power.
You are absolutely correct. My explanation was an over-simplification.