In response to a question from a student, I explained S5 as the claim that modal truths don't vary between worlds—a modal truth, we might say, is a proposition of the form "Possibly p" or "Necessarily p" that is true. But actually, that's incorrect as an account of S5. S5 is compatible with there being modal truths in some worlds that do not obtain in others.
To see this, we need to make Robert Adams' distinction betwen truth at a world and truth in a world. On Adams' view, a proposition making de re reference to a particular only exists in a world where that particular exists. Consequently, propositions that reference contingent particulars de re are not necessary beings. Since there are modal truths involving contingent particulars, such as that possibly I will yell "Hurrah!" in five minutes, it follows that some modal truths exist in some worlds but not in others.
Adams' distinction, then, is basically this. We take as the primitive notion being true at a world. We might gloss this as follows: a proposition p is true at w provided that the state of affairs it reports obtains in w. We can then define being true in a world counterfactually: p is true in w iff it is the case that were w actual, p would be true. Since a proposition can only be true if it exists, it follows that p is true in w iff p is true at w and p exists in w. And if we like, we can say that p exists in w iff it is true at w that p exists.
On Adams' view, the proposition that Socrates either does not exist or is human is true at every world. But it is only true in those worlds in which Socrates exists.
Let us then follow Adams in allowing that some propositions exist in only some worlds. Then, in some worlds there will be modal truths that are not true in the actual world simply because they do not exist in the actual world. We now have two ways of defining modal operators. I'll just define possibility, M, since necessity is dual to it (Lp iff ~M~p). We say that M1p iff there is a possible world w such that p is true at w. We say that M2p iff there is a possible world w such that p is true in w. These give different results. For instance, if Adams is right about propositions about particulars, then M1(Socrates never existed) is true but M2(Socrates never existed) is false.
The modal logic we get with M2 is no good. According to that modal logic, necessarily Socrates exists, but possibly there are no humans. So the modal logic we want is the one defined by M1. But this modal logic is just fine for S5: it is basically just a restriction of a Plantingan modal logic with no scruples about non-actual particulars to those propostions that do not reference non-actual particulars de re.
Now we have a picture of modal logic that satisfies S5, even though there are modal truths in other worlds that are not modal truths in our world (because they do not exist as propositions in our world).