How to obtain the same SlicerElastix registration result outside 3DSlicer?

OS: Windows 11
Slicer version: 5.9.0

When I perform a transformation using SlicerElastix I get a different result than the one I get using other Elastix libraries external to 3D Slicer. I tried to load the same parameter configuration txt files but the differences persist. The recording via SlicerElastix is ​​clearly better and I would like to achieve the same result automatically via external python scripts from the 3D Slicer GUI.