Nobody ever claimed Iran has freedom of religion - they tolerate some as mentioned but Islamic offshoots like the Bahai, Ahmadiyya and the Alawites who claim some link to mainstream Islam and further revelations after the prophet died are definitely not tolerated.
Saudi Arabic will sentence you to death if you are deemed to be an apostate (denying Islam or converting to another religion - also no proselyting if you a Christian visiting/staying there).
E.g. the Baha’is
From 2008. Just the first paragraph will do.
https://news.bahai.org/story/632/
2018.
https://www.hrw.org/news/2018/10/16/iran-arrests-harassment-...
2022. The same ones imprisoned in 2008.
https://www.timesofisrael.com/iran-throws-leading-bahai-acti...
Tip of the iceberg.