After spending hours presume there is an error in my code on the page that the buttons are placed, it turns out that the code is not the issue. I can confirm that by making a new HTML page, and follow the documentation to put those smart buttons on the page, and it doesn't work.
By "doesn't work", here is what I mean. The expected behavior is that when the user clicks one of the PayPal buttons, the page should go slightly dark and have the PayPal message in the center regarding the popup window, then (or almost immediately) the paypal popup should come up and allow the user to login to their PayPal.
But what happens instead, is the page does not go dark at all, and the PayPal popup opens but never finishes its initialization. A spinner will appear for about 10 seconds, and then the popup closes. In the console log in the browser, one will see a number of ERROR events indicating that "no response was found for" etc.
After many hours trying to get this to work, in the end the way I "fixed" this is to either use Chrome but not in debug mode and connected to VSCode as a debugger, or to use Firefox. Firefox works fine even in debug mode etc.
It is worth mentioning that the integration I am working on is dealing with subscriptions, not product checkout. So it is possible the issue I have hit is only hit when working with subscriptions. Though I doubt that is the case.
It would have saved me some time and headache if I had known this, and hence why I am posting it here.