Thanks for isolating the issue in a clean project and confirming it still occurred with only the Log and Battle UI plugins. That made it quick to pinpoint.
The bug was in Scene_Battle.onEnemyCancel for offensive items that target 1 enemy. Self-use items were unaffected because they don’t go through target selection.
It’s fixed in DM_FFStyleBattle v1.07. Grab the update from itch.io or dmplugins.com and replace the file in your js/plugins folder.
This resolves the incorrect window activation when pressing ESC/X at the target screen. No other setup needed.