Of course it is a sin to convert to Islam. Whether or not it is a mortal sin depends on the circumstances: it is definitely grave matter. To convert from Catholicism to Islam is grave matter. Done with the ability to know and investigate the truths of the Catholic faith means that one has sufficient knowledge. And it is always a part of mortal sin to consent to committing apostasy. (Some acts are always mortal sin: apostasy, sacrilege, blasphemy, abortion, any crime against the sixth commandment, and to consent to them is always wrong. The only thing to save someone is that they are honestly mistaken about the nature of the act).
There are of course exceptions: a child, baptized by his parents, suffers the loss of his or her parents, say in a car accident. He or she ends up in an orphanage. A Muslim couple decides to adopt him, and raises him as a good Muslim. The child would have rejected Jesus Christ, however, he is not responsible.
But for an adult with full faculties were to convert to Islam, hence becoming an apostate, and has the ability and a reason to seek out the truth on religion, would lose his soul, for worshipping God in a way that is not approved by Him, and which is only found in the Roman Catholic Faith.
“For God so loved the world, as to give his only begotten Son; that whosoever believeth in Him, may not perish, but may have life everlasting. For God sent not His Son into the world, to judge the world, but that the world may be saved by Him. He that believeth in him is not judged. But he that doth not believe, is already judged: because he believeth not in the Name of the only begotten Son of God.” (John 3: 16-18).
Jesus saith to him: I am the way, and the truth, and the life. No man cometh to the Father, but by Me. (John 14: 6)
Tiber class of 99/00