All my life, Doc, I've questioned whether God would be OK with me outwardly pretending to convert to Islam (or something like that), but inwardly He would know my heart was really still in surrender to Him - I would just be outwardly pretending. Would this be OK.
Some verses of the Bible suggest we should confess Jesus boldly. Yet, there ARE times in the Bible when Jesus or the apostles used trickery to protect themselves, because their time to be martyred had not yet come. Example, Jesus used magic to get through a hostile crowd, crossed the sea quietly, avoided a town, etc. Also when Paul was lowered in a basket (was it Paul?) outside a city to avoid being martyred - so it's not like there is no precedent for apostles avoiding death when possible.