Hiding structure from global graph in Publish

What I’m trying to do

My Obsidian Publish site is split into a public half and a private half that I use to share notes amongst friends that I don’t want accessible by just navigating the site. I removed the private half from navigation so it doesn’t show up there but if you look on the global graph you can see everything. Obvs I could just disable the graph but that seems like a shame since it is functionally helpful on the public half.

Things I have tried

I tried using the graph.json file in .obsidian/ but this doesn’t change the published version. I inspected the html but the script to produce the graph itself is from publish.obsidian.md which I don’t think I can alter.

Thanks!