Closes #28787 The context menu appears before the modal because it is a Deferred element, which is always displayed above normal elements. Release Notes: Previously, the editor context menu appeared before the Command Palette. This commit ensures the editor context menu is hidden when a modal, including the Command Palette, is opened.