That freedom of thought is free insomuch that it conforms with the dominant ideology.
Many states have bans against people serving in government jobs if they are communists. How is that free?
https://www.usatoday.com/story/news/nation/2013/02/23/anti-c...
https://www.dailybulletin.com/2013/01/13/california-law-keep...