There's no reason to make the users eyes constantly seek for where the commands for advancing are. Keep them in a stable area of the UI.
If you have a modal that's split among steps, users often think of the modal as a persistent view, with steps embedded.
Using a persistent size keeps the unity of the view, and you can size the modal as needed, relative to the viewport. The most important UI areas are consistent orientation ('How many steps, and where am I?'), and available actions ('How do I advance / go back?'). Keep them steady...
For denser, scrollable steps with more inputs, you can have a visible scrollbar, and enable the Next button when required fields are filled.