Missing checkout data in window.Shopify on post purchase page

https://help.shopify.com/en/manual/promoting-marketing/analyze-marketing/pixel-tracking-post-purchase-page#table-heading-order
I am tracking events in Additional scripts box according to the guidance of this document.
Following the instructions in the document, I can get order data through window.Shopify. But there is no order information in window. Shopify on my purchase page. What should I do to fix it?

On the order status page window.Shopify is normal

I have found the reason. This is dedicated data within the Additional scripts box and cannot be printed in the browser