Instead of DistributionPublicUrl Use ContentDownloadUrl
SELECT ContentDownloadUrl FROM ContentDistribution WHERE ContentDocumentId
You must get the ContentDownloadURL in the Image Source of the Site that you want to use.
So here's the thing.
Returning null to the <apex:actionFunction> should be sufficient. What I was doing wrong was I didn't set the reRender attribute on the actionFunction. So that when the controller function returned null the actionFunction reloaded the whole page.
Given that, the solution is simple.
Add this to the VF page:
Probably the guest user sharing changes. The moment you have finished inserting the Dog, guest user no longer has sharing access to it. Setting it as a parent record will throw insufficient access on cross-reference.
You could add guest user sharing rules, or you could put the DML into a without sharing context. Really up to the business requirements.