I have no idea where you are getting that boxers are smaller than German shepherds. It's purely an individual basis, and as a rule they are close to the same weight category. Some boxers can be around 90 pounds and not obese.

From AKC.org

GERMAN SHEPHERD DOG
The desired height for males at the top of the highest point of the shoulder blade is 24 to 26 inches; and for bitches, 22 to 24 inches.
BOXER
Adult males 23 to 25 inches; females 21½ to 23½ inches at the withers
1 inch shorter if you are comparing the top end of the GSD scale... maybe. and some of course are going to be just as tall as a GSD, some GSDs are shorter than normal. The size difference is very minimal on average, and energy level should have much more to do with confining a dog in small quarters than physical size.