Problem with Scripting & Terminal editor 'Close tab' shortcut

I use a mac with an azerty keyboard.

Scripting & Terminal editor ‘Close tab’ shortcut is cmd+W

I have to do cmd+Z to close a tab, and it’s messing with ‘Undo’ shortcut.

The other shortcuts seems fine.