That’s all correct.
Some code development IDEs try to rewrite the code you have already written in situations like this, but there usually ends up situations where it doesn’t work.
When you want to edit the number of ports or their types or data type and/or add user defined parameters, keep a copy of the code, regenerate the template and add back what is still appropriate for the new module definition.
–Mike