I think you have a good point. It doesnt seem like specific over general in this case. Both rules can just exist and the creature could make a save, fail it, and then the stun that would apply just doesnt happen because of the immunity.

What if you are already immune to stunning but then acquire the earth glide ability, would your immunity work? I think it would and I think this example is closer to this situation than the ones I read on this thread.