MZ Is there a way to force-close or interrupt a message window?

I'm working on a stealth/minigame section where if a guard walks past the player while they are acting suspicious they get caught, but part of it includes the ability to cancel your action with a text window and choice window combo. Ideally I'd have a parallel script that checks if the player is meeting the "suspicious act" criteria and triggers the "got caught" condition immediately, regardless of whether the text window is open. As it is, the best I can do is wait for the player to close the text window manually and have the caught condition execute after.
Is something like that possible? I can't find any way to close the text window from a parallel event, only player button press.
Script:
SceneManager._scene._messageWindow.terminateMessage();

EDIT:
And for choice:
SceneManager._scene._choiceListWindow.processCancel();
Script:
SceneManager._scene._messageWindow.terminateMessage();

EDIT:
And for choice:
SceneManager._scene._choiceListWindow.processCancel();
Seems to work, but only partially. When I do that it not only closes the text message, but skips the next text box also, and hangs, waiting for input.

Structure is like:
Parallel 1: (really long event), text box
Parallel 2:
◆Loop
◆If:Script:$gameSelfSwitches.value([4, 3, 'A']);
◆If:Self Switch B is ON
◆Control Self Switch:C = ON
◆Script:SceneManager._scene._messageWindow.terminateMessage();
◆
:End
◆Set Movement Route:Player (Repeat)
:Set Movement Route:◇Wait:60 frames
◆Show Balloon Icon:Patrol Guard, Exclamation
◆Set Movement Route:Patrol Guard (Skip, Wait)
:Set Movement Route:◇Speed:6
:Set Movement Route:◇Move toward Player
:Set Movement Route:◇Move toward Player
:Set Movement Route:◇Move toward Player
:Set Movement Route:◇Turn toward Player
◆Text:None, None, Window, Bottom
:Text:${qc.pg1}
◆Erase Picture:#1
◆Erase Picture:#2
◆Erase Picture:#3
◆Erase Picture:#4
◆Erase Picture:#5
◆Erase Picture:#10
◆Erase Picture:#11
◆Erase Picture:#12
◆Erase Picture:#13
◆Common Event:Clear Hud
◆Fadeout Screen
◆Script:$gameSelfSwitches.setValue([4, 17, 'C'], true);
◆Control Self Switch:A = OFF
◆Control Self Switch:B = OFF
◆Control Self Switch:C = OFF
◆Break Loop
◆
:End
◆Wait:1 frame
◆
:Repeat Above

so it skips the text command you see there, then waits for input.

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-force-close-or-interrupt-a-message-window.182723/