all you need is the amount of pipe necessary to contain the baffle.
Go ahead and cut it back as far as you need to. However, I would recommend a strong brace solidly attached to something, preferably the engine itself, leaving a slight amount of movement possible to absorb vibrations from the engine. Any piece of hard rubber loosely clamped between the motor casing and the exhaust would provide that.
As an industrial refrigeration expert, I could talk all day about vibrasorbers rigid-mounted on one end and left free on the other that keep 500-ton hospital chillers from micro-cracking refrigerant piping, but you only need something homemade. Whatever you can come up with that will prevent the muffler's weight and the engine's vibration from cracking that exhaust header someday should be fine.
Adding a pic of an overweight/overlength silencer I supported with an oversized standard U-clamp that I threaded thru 3 balls of stainless steel wool to cushion it, supporting the weight, but giving any movement needed for a minibike jumping hobos on the railroad tracks.