Julie here from Shopify Support.
I'd love to help your with your dynamic checkout button. However, it would be helpful if you can provide more context. This will allow me to offer you the right troubleshooting steps.
First off, did you make sure to follow our instructions on adding dynamic checkout buttons when you first set this up? Did you happen to edit your theme's code?
Is the issue only happening with a specific product, or with all of your products? If the issue is only happening with a specific product, it would be great if you could share a link to that product so I can check things out here on my end.
Lastly, which theme are you using? Is it a free theme developed by Shopify, or is it a third-party theme? If it's a third-party theme, then you'll likely want to contact the theme developers directly; since they know their theme's code inside and out, they'll be the best equipped to assist.
It's important to me that your issue is resolved. With some more context, I'll be able to offer the appropriate next steps.
Looking forward to your response!