plot scatter with row number,
open properties dialog of legend, go to frame tab ? check all margins are 12.4
mouse over legend to show hand icon, then click and drag to resize margin to maximum size
ctrl+Z, open properties dialog of legend, go to frame tab ==> left top margin is 13, right bottom is 12.5
repeat step 4&5 ==> left=13, top=13.5, right bottom is 12.5. It seems left and top could be bigger in every time
Fixed in Origin2025
We also support undo legend margin change for 3D in Origin2025.