Use `BKE_panel_layout_panel_state_ensure` to get a panel open/close flag without requiring a DNA flag.