When a tag is added in a cell (Document table or Excel row), the cell height is based on the text with the tag, which can be longer than the final input text version.
In the template, select the cell height and change this to be “At Least” a low value, or remove the cell height constraint altogether.
This will avoid problems with the final version.
Unfortunately Pages does not have this option, so when saving a Pages document to .docx format, the “At Least” constraint is not set in the .docx. If you are using tables, it is recommended to use Word.