If players are digging through your game's code looking for secrets, it's already a success
Fundamentally, if players are spending the time hunting for the secrets in your game, it means that they are invested in the game, and almost certainly enjoy it. This is good!
Generally speaking, there are three types of players (as far as this conversation goes).
The first type of player is solo players who don't interact with the community at all. They'll play your game the way it's meant to be played without interacting with other players, or digging into the source data or anything of that sort. They'll discover the game's secrets as they play. Or they won't, because they'll lose interest before delving into the game's depths. But that's okay. A game doesn't have to capture a player's interest forever to be a success. If a player enjoys the time they spent on the game, it was a success even if they never try to reach 100% completion. This is probably the largest group of players.
The second type of player are players that interact with the community. They'll look up walkthroughs, read wikis, and watch streams. They'll learn the game's secrets through these sources rather than piecing together clues in the game itself. This is the second largest group of players.
The final type of player are the ones discovering the secrets for the community. The ones making the walkthroughs and wikis. They're the smallest of the three groups, and they're almost certainly the most devoted to your game. They might learn the secrets from the clues you left in the game, or from reverse engineering the source code. But honestly, it doesn't really matter. You don't become a community leader of a game you dislike.
The first group will never think to look for your secrets anywhere but the game itself. The second group doesn't need to look for your secrets, because they're relying on others who have found them. So your question is only relevant to the third group, which is both the smallest and most devoted to your game. You don't have anything to be concerned about.
That said, there are few things to consider.
Basic Obfuscation
If players have access to the source code, they have access to your secrets. I wouldn't spend enormous amounts of time concealing the secrets, as it would be effective, but some basic levels of obfuscation wouldn't be amiss. Probably don't name any of your audio files "player_is_betrayed_by_their_best_friend.wav". Giving files generic names goes a long way to preventing players from finding secrets without any effort.
Guide Dang It!
Tvtropes (warning!) has a page devoted to puzzles that were ludicrously difficult to solve without a guide. I do not think you should aspire to be on this page. If a secret is easier to find in the source code than in the game itself, it's possible that it's too secret. Obviously, mileage will vary and this is certainly a matter of taste. But how a secret is hidden in the game is far more important to how it is hidden in the code.
A Side Note
A common criticism I've seen of Hollywood these days (and of Marvel in particular) is an obsession with Plot Twists, and particularly an obsession with keeping these plot twists secret, to the point where they hide details of the movie from the actors involved with the twist to prevent leaks.
This is not how plot twists, or secrets, should work! Obviously a twist or secret will be most effective if revealed in the manner the creator intended. But if that's the only way in which it is effective, if the shock value itself is the only way it is interesting, it's not a very good secret. It should be enjoyable to replay or rewatch a game or story already knowing the secret.
As a personal example, I've quite enjoyed finding all the hidden nooks and crannies in Noita, even though I've known about all of them ahead of time through community content. Reaching them and unlocking them was enjoyable even without extra puzzle of figuring out where they are and how they are unlocked. The secrets stand on their own without the surprise factor.