It’s not saved as a draft. It’s published as any other post would be, but it seems something is triggering on the backend of PokaTheme to make the post be updated on the frontend. It displays as a blank post, with no content.
When you click “Update” in the editor, the post looks the exact same. Even the database entry is the exact same. I studied every single element of this for hours, nothing changes the initial insert post code and the “Update” in the editor.
After all the time looking around, I can only assume that something is not triggering on the backend of PokaTheme. Something that triggers when pushing “Update” manually, but not when doing it programmatically.
I also experimented with doing wp_update_post after wp_insert_post, but it still doesn’t work.
I’ve tried this with dozens of other custom post types on dozens of other themes, and it’s only PokaTheme that has this issue.