First the Verse (2:42) you quoted is addressing the scholars/rabbis of the Jews or Banu Israel (as it is the case for a big part of surat al-Baqara).
In classical tafsir books (like ibn Kathir) scholars tend to say that the meaning of this verse is:
(And mix not truth with falsehood) and said; "Do not mix the truth with falsehood and the facts with lies.'' Qatadah said that, (And mix not truth with falsehood) means, "Do not mix Judaism and Christianity with Islam, (while you know (the truth).) that the religion of Allah is Islam, and that Judaism and Christianity are innovations that did not come from Allah.'' It was reported that Al-Hasan Al-Basri said similarly.
Also, Muhammad bin Ishaq narrated that Ibn `Abbas said that,
(nor conceal the truth while you know (the truth).) means, "Do not hide the knowledge that you have of My Messenger and what he was sent with. His description, which you know about, can be found written in the Books that you have.''
It is possible that it means, "..although you know the tremendous harm that this evil will cause people, misguiding them and leading them to the Fire, because they will follow the falsehood that you mixed with the truth in your claims.''
Al-Qurtoby in his tafsir offers an further possible meaning if we interpret اللبس which has been translated into mixing as hiding/concealing which applies for example for dressing, as by dressing we hide our awrah. If this meaning applies then that would mean "do not hide with or behind falsehood the truth while you know it (the truth)" as stated by ibn 'Abbas in tafsir ibn Kathir. Again falsehood could be interpreted as quoted by ibn Kathir or as anything that is against the truth. He added a quote of ibn Zayd saying that the truth here is the Torah and the falsehood is what they have changed or deleted from it like the prophethood of Muhammad (peace be upon him), which can be found with a reference in tafsir at-Tabari.
At-Tabari said that two interpretation are available for the part of the verse
"...conceal the truth"
The first interpretation is that of ibn 'Abbas which means Allah forbade them to hide the truth and also forbade them to conceal/mix the truth with falsehood.
The other interpretation is the one of abu-l 'Aliyah and Mujahid which means Allah forbade them to conceal/mix the truth with falsehood, while they knew the truth.
So according this the rabbis used to perform delusion by hiding some of the information and characteristics -which have been revealed in the Torah- about the Messenger of Allah (peace be upon him) and mix them with truth or don't mix Islam with Judaism and Christianity as quoted above.
Conclusion
So this verse is to some extent agreeing with what you assumed, but it addresses (scholars, people of knowledge or authorities of) the people of the book in first place. While verse (16:106) is the major reference or evidence for the permission of concealing being a Muslim or denying it to save one's soul. For further information read tafsir ibn Kathir and feel free to ask!.
And Allah knows best!