As far as i know, if a BG is visible, then it 'lives', and this by definition (the reciprocal isn't true).
Do you mean what's displayed changes when the window lose focus and gain it again?!?

it then creates the scengraph completely correctly, but somehow destroys it between creating and displaying it
I suppose, you don't see what you expected, or even nothing, right? Then:
1) how can you know the scene is correctly created when you see the wrong result?
2) If it is truly correctly build and added, have you checked some usual "forgot-things" (lights, view, adding BG somewhere, obsolete transforms..)?
3) If it's an animated scene, maybe ongoing behaviors is the reason of unexpected results(?)
and performing any picking on it - the MousePressed action finds the branchgroup null.
Does it happen when you click on visible objects, or the place they should without seeing them?
(And the flag ENABLE_PICK_REPORTING flag is set i suppose)
These are just thoughts...
...I think it needs some more details to help you out.
Cheers