Bug Encountered with Badges Based on Score

I’ve noticed that users who are excluded from the leaderboard can still earn scores and obtain badges through the ‘Enable Badge SQL’ method. Is there any way to prevent this from happening?