I have experienced bad things in Muslim communities for so many years that it led me to giving up religion and I went astray. After going through many hardships in life alhamdulillah I came back to the Deen to take shelter. However I'm afraid of mixing with Muslims again. They are shallow at their thinking, even non Muslims understand me better and try to help. I'm tired of being judged yet I want to belong to a community or at least have Muslim friends so I'm not alone. How can I find balance?
Your experience of not finding mixing with other Muslims uplifting, although disheartening, is common. The Medieval scholar Ibn al-Jawzi mentions the same thing, and one of the primary pieces of advice he offers in his book of advice Sayd al-Khatir is that one shouldn’t mix too much with others, because most people are not very spiritual and will harm rather than benefit your faith.
When it comes to most Muslims, Islam is just a small add-on on top of their personalities and characters, so that if their personalities and characters are not compatible with yours, Islam will do little to change things. The exceptions are those who have taken Islamic spirituality to heart and try to follow Quranic manners in everything, but such people are rare, and you will be lucky to meet one among a hundred Muslims you meet.
There are different sections of society, each section having its own interests, character and manners. What Islam means for one section can be very different to what it means for another, therefore if you try to engage the wrong section, you will may not get anything satisfactory out of it.
I love reading, but the majority of people, including the majority of Muslims, do not. The people I like to befriend are those who enjoy reading and learning, and such people are few. This means that most people I meet are not going to be the type I can enjoy spending time with, even if they are good people and I like them.
Your experience might be the same. This is also the experience of many genetically European converts to Islam, who want to find fellow Muslims who are interested in intellectual topics, who care about the long-term good of the community and want to plan things and solve problems, but who discover that most people in the community do not care very much about these things. Perhaps this is what you meant when you said you find most Muslims shallow.
The type of people you like might be rare and perhaps not present in your local community. The internet can be a great help in overcoming this issue. You can find like-minded Muslims from around the world and follow them and perhaps befriend them. The people I keep in contact with over the internet are far higher in quality as friends compared to anyone I know at my local community.
Feeling lonely is a common experience if you are different from the people around you. You must first accept this reality, knowing that this is how things will always be unless God grants you the deep friendship of someone. In the end, it is only God who can cure our loneliness. He can arrange things for us, plan for us and facilitate things for us so that we are no longer lonely, if He wishes, if the time is right and if we deserve it. For this reason this is a thing that must be sought through God more than through any other means.