Hi @TechInventor20. I just tested the scenario you explained, and it worked OK for me. I am currently using Inventor Pro 2024.3.3.
I edited one of my existing global iLogic forms, added a button into it for running a simple external rule that only shows the Document.DisplayName obtained from the ThisDoc.Document source, then contains that one line of code for closing all iLogic forms. When first tested this, when I clicked the button, it would show that MsgBox containing DisplayName, then wait on my to click the OK button on that MsgBox, then it would close the form. When I edited that external rule, and commented out that line of code that closes all forms, then tested again, and clicked the rule button, it showed the MsgBox, and when I click OK button on MsgBox, the form stays open. All as expected.
What version/release/build of Inventor are you using? Maybe this odd behavior was fixed in an update, not sure. Would have to search within the online documentation that covers 'release notes' and/or 'fixed issues'.
Wesley Crihfield

(Not an Autodesk Employee)