Collapsible Section should be open/expanded ONLY when I am working on that form and not otherwise

Dear Awesome Team,

We have applied Collapsible Depends on condition, with OR operator on all the fields in the section.

Section remains open if any of the field has the value, thats perfectly how we want it to work.

But problem is - when I open that particluar record after reffreshing the form, the Section is still open due to the condition, but now I dont want to it be open as I am not interested in those fields of the section, I came to check the record for other fields. Due to Section being open all the times, Section gets very long.

Collapsible Depend on JS Code is below(just for ref):
eval:(doc.buyer_uae_id || doc.buyer_passport || doc.buyer_visa || doc.buyer_security_cheque || doc.uae_id || doc.passport || doc.visa || doc.security_cheque || doc.title_deed)

One Solution - We shall create tabs for each of the section, but I dont want Tabs for now.

Any support is highly appreciated.
Thanks

Any help will be highly appreciated.

@Sohailans you can try this frappe.ui.form.on(‘Doctype’, {
refresh(frm) {
if(!frm.doc._islocal && (doc.buyer_uae_id || doc.buyer_passport || doc.buyer_visa || doc.buyer_security_cheque || doc.uae_id || doc.passport || doc.visa || doc.security_cheque || doc.title_deed){
cur_frm.fields_dict[‘documents’].collapse()
cur_frm.fields_dict[‘documents’].collapse() }
}
})

Really thanks Jeel.