It's the mouth frames. Portraits of certain characters are placed lower than others in the statscreen (e.g. Oswin, because his head would go through the top of the window if he weren't). The way Dewey in Bloodlines gets around this is by just using Priscilla's portrait slot instead of Eliwood's. This is also why the token troubadour character who replaced Priscilla in mods always seems freakishly tall in the statscreen. This glitch never shows in vanilla FE because there are no characters who have mouth frames that are low enough to go through the box while also having portraits that are lowered.
tl;dr use a diff portrait slot and re-purpose the old one for a villager or something