Mastodon’s search not applying to all posts is ‘a feature, not a bug’, as mentioned in the documentation:
Admins may optionally install full-text search. Mastodon’s full-text search allows logged-in users to find results from their own posts, their favourites, their bookmarks and their mentions. It deliberately does not allow searching for arbitrary strings in the entire database, in order to reduce the risk of abuse by people searching for controversial terms to find people to dogpile.
https://docs.joinmastodon.org/user/network/#search
I do understand the rationale behind it in that it makes it safer for people to share personal or political things to their followers without the risk of abuse from strangers, and the recommended alternative is to hashtag any post that’s okay to be publicly found.
The problem with this is that there is no agreement on which hashtags to use consistently, and that people are not used to, or feel a stigma about, adding hashtags to the end of each post.
Some people consider it an overly attention-seeking behaviour, because overusing hashtags is associated with marketing and influencers trying desperately to gain maximum reach on platforms like Twitter and Instagram.
Meanwhile, on Mastodon it’s more of a thing to hashtag posts with like #photography or #[name_of_videogame] when sharing things, so other people with the same interests can find them.