Esc key behavior at Modal-Dialog (Custum-UI , @forge/bridge) with autofocus elements

Hello everyone,

I made the experience that the Esc key doesn’t work (no Close on Escape) when you call a modal-dialog with elements (textareas …) using the autofocus option.
But sometimes the autofocus doesn’t work - then the Esc key works as Close. Strange for me!

Did you make the same experience? Is this the intention?
Is there a workaround?

Modal definition:

const modal = new Modal({
			resource: "modaldialog",
			onClose: (payload) => { ... },
			closeOnEscape: true,
			closeOnOverlayClick: true,
			size: "medium",

Textarea inside the Modal

	placeholder="Enter the text here"