If you copy a piece of GPL code but change the whitespace or some arbitrary number that produces the same output, does that still still break the license (if you don't make the source public)?
> if you don't make the source public
I'm not sure what you mean by that, the GPL only has constraints for redistribution. If you don't distribute anything (publicly or not), there is no way to break the GPL.
But just because you slap a license on something does mean you actually can enforce it.