I have a 9mm P99 (black on black) and my barrel also is loose when the slide is locked back. I think this is probably normal for this particular gun as I haven't had any problems when firinng it. I don't notice any rattle when the slide is in its standard forward position.
Have you had any issues when actually firing the gun?
It seems to be perfectly normal for the gun. I have the same kind of rattling in my 9mm, I just called Walther America. These guys are really nice and helpful. A rep said it is perfectly normal and should be so.
The barrel should be tighter when the slide is forward but still be able to wiggle a bit. The H&K engineers came up with an ingenious solution when they designed the mark 23. They put a rubber o-ring on the end of the barrel to keep it snug in the slide and frame when the slide is forward.