Custom field "Depends On" document SAVED

Is there something I can add to the “Depends On” box in a custom field to make it visible if the document is in draft or submitted?

I would consider a custom script to if nothing else.

doc.docstatus == 1 should work to check for submitted and doc.docstatus == 0 for draft I think

This works on fields on the parent form, but not on a child form which I forgot to mention.

The bigger issue for me though is that I need the field to be only visible after the document is saved. I thought doc.docstatus == 0 would work but the field is visible before the document is saved, so I guess the document is considered in “Draft” status immediately on opening a new document, even before it’s saved.

Any idea how I can trigger a custom fields visibility when the document is first saved?