By time, I mean how much did it change over time.
This question was inspired by a friend of my dad. He apparently was a Physics professor in the USSR. He decided to get ordained as an Orthodox Priest. They told him he'd have to renounce his ordination, but he refused. He was blacklisted from working as a scientist, his wife was essentially forced to divorce him to save her career, and he had to work as a cleaner for a while, before getting to the West (and now he's a university professor again). So I essentially wanted some context for the story.
In China, where I used to live, religion hurts your chances within the Communist Party, but it's not generally a problem for most jobs, though it depends a lot on which religion. I wondered if it was more of a problem in 80s Russia, or if it was just for the scientific class, or if professors were generally party members.
In order to get some attention from the state repressive system in USSR one had to attract its attention. This could be done in various ways: sign a petition, discuss "wrong" topics, etc. Of course, members of some social groups were under more strict supervision. In your case it looks like a superposition of the two. Your dad's friend was in a supervised social group and he manifested himself by being officially ordained. Unofficial religiousness had less consequences of course. There were churches, there were priests. In various places there were different levels of "common" religion habits, e.g. in Belarus I've seen city administration office closed because of catholic holiday. This was impossible in Moscow or Leningrad. Scientific assessment of the question is difficult, because in literature it is generally viewed from the viewpoints of different religious groups. There are many books about Jewish religious movement in USSR, see
https://www.amazon.com/Underground-untold-handful-spiritual-revolution-ebook/dp/B00SN7QYYS
https://books.google.ru/books/about/Jews_and_Jewish_Life_in_Russia_and_the_S.html?id=bJBH5pxzSyMC
Less about Islam