In namespace-aware processing, the prefix is irrelevant. Matching occurs on the actual namespace URI and the localname. Your stylesheet needs to specify the same pair of values that's being used in the actual document.
If the stylesheet is working in one validation setup and not the other, different namespaces are being assigned to the node in those two cases. You need to figure out why. Note that, as discussed, it _shouldn't_ be working... so the question is what you did wrong to cause namespace binding to fail in the case where the stylesheet runs anyway.
