Max Repels don’t work in the Trophy Garden. They prevent wild encounters in the main game, but the Trophy Garden only contains Pokémon you’ve already caught and registered. No wild encounters occur there, so Max Repel has no effect.