Fyodor Mikhailovich Dostoevsky was never a Catholic. He was always an Orthodox Christian. In fact, Dostoevsky criticized Catholicism in many of his works for the reasons scholars of history of the Christianity can understand easily.
The older and wiser Dostoevsky got, the more he understood God the same way Orthodox Believers of Old Rite do. Old Believers are not some kind of sect, they actually are the original Orthodox Christians who rejected the church reforms in 17th century, when the Russian Orthodox Church decided to “modernize” and become a convenient tool of the state. Old Believers understood that such reforms would only keep people from real faith by having them engaging in more transactional behavior with the church, thus undermining the whole idea of faith and life in Christ.
Dostoevsky understood this when he observed the officially Orthodox Christian Russia of the 19th century being easily consumed by the shallow and evil ideology of Marxism. He understood that official church in Russia then failed its people completely.
This is why Dostoevsky wrote 12 great novels (think of the 12 apostles), sending them off into the world that was being destroyed by Marxism and atheism in front of his own eyes. This is why he created so many characters that were representing so many interpretations of Marxism by different folks - Dostoevsky was meeting his readers at their level first, so that he could then carefully guide them to Christ. This is why he created Zosima, Tikhon - those were the few characters he actually spoke directly through in his Karamazov Brothers and Demons.
Most of the other characters and heroes in his works were all either lost or looking for their answers, some - like Prince Myshkin or Alyosha Karamazov, or Darya Shatova, were closer to God than others, while Stavrogin, Pyotr Verkhovensky, Raskolnikov were too far from God.