Healthcare Patient Encounter if Practitioner is not Active

Hi all,
I have encountered the following situation that when you disable (not Active) the Practitioner and go to Patient Encounter this disabled Practitioner is still visible when selecting.
I have tried by adding the below custom script and also directly to the source code of patient_encounter.js with no results… It still shows the disabled or not active Practitioners.

frappe.ui.form.on(‘Patient Encounter’, {
refresh: function(frm) {
frm.set_query(“practitioner”, function () {
return {
filters: {“active”: 1}

On previous code on V10 we could filter by hadding get_query instead but i can see that on v12 is not possible.

Any solution yet? I did not have this problem when on V13, then when I updated to V14 the disabled practitioners all showed up again.

Actually only now i am moving to V13… have not yet come to test this part.
My plan is to start on V14 next Year.