Are you still having trouble with getting this to work? And if you are, could you link me to your page? I think the best way to get this working is to first pull down the JSON for the page using this endpoint: https://developers.hubspot.com/docs/methods/pages/get_pages_page_id. Then you can copy the structure in the JSON, replace the specific content, and push it back up. One thing that could be happening in your case is that you're trying to update content inside the widgets field, when actually that may need to be done inside the widget_containers field. widget_containers is where the module data go when they're nested inside flexible columns for example. So if you're trying to pass in your module data inside the widgets field when it actually needs to be in the widget_containers field, it's possible that the tool just isn't reading it correctly and sets the content to be blank.
Here's an example from my own testing. I made a GET request for a page and had this JSON inside the widget_containers field:
The widgets field was blank. I then copied that and pasted it in as the JSON for my request body to content/api/v2/pages/:page_id. Then I edited the content slightly and pushed this up with a PUT request:
I don't know if that helps in your specific case, but if you're still having any trouble with it, feel free to follow up here and link me to a page so I can take a look at what the module data look like.