Error from copy single page for an existing page with restrictions even when user is allowed

When I try to use the copy single page API to update (copy over) an existing page that has restrictions, I am getting the following 500 error:
status {'statusCode': 500, 'message': 'javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement'}

This page was previously created under a parent page using the same copy single page API.

My Confluence user has permission to read and update the page and is part of a group that has also has these permissions.

I don’t particularly want to make the page public before it is updated but I could do that as a workaround.

In any case, if anyone knows any more about why this error is occurring and any other way of preventing the error, I would be grateful to hear of it. Thank you!