That is not an accurate depiction of what Maimonedes said. That statement (living by the law) only goes to issues other than - idolatry, adultery and murder.
I think that under Jewish law a Jew would not be allowed to do what Centanni did.
Maimonides wrote about Jews forced to convert to Islam in the 12th century in Spain when the Almohades invaded forcing him to flee the country. He wrote that conversion was a bad thing even to save your life BUT THAT YOU WOULD BE FORGIVEN if you made an effort to return to Judaism.