Hello,
Yes, it's a limitation of the old version you are using. We recommend you upgrade to the latest release; you can test this same method using the trial package (https://www.phpdocx.com/download_trial) before upgrading.
Using phpdocx 7, to keep the field tags included in addPageNumber you need to do a block type replacement instead on the inline type replacement your code is using:
"type" => "block"
Regards.