The reason this doesn’t work so well is that Lemmy communities are ActivityPub groups, which is not a feature the Mastodon has really implemented - right now you just follow the group as a user and it boosts all the posts to you.
However, Mastodon plans to do groups in their next major update, and this will most likely make the integration much nicer.