When requesting legend graphics with a legend size smaller then graphic size defined in SLD, graphic mark get cropped. It seems as the stroke width is not taken into account during the rescaling process (or maybe some rounding issue somewhere?)
GetLegendGraphics Rule is requested wit following relevant parameters:
In this example Rule size is set to 30px, and requested legend size is 40x25px. Attached are sld snippet and original/resized legend image.