Keyboard shortcut for adding a link no longer works after switching from preview mode to edit mode

Problem

Normally when I'm the editor mode, I use ⌘K to add a link, like this:

CleanShot_2023-06-28_at_18.28.49

However, when switching to the preview mode and back, the ⌘K shortcut no longer works:

CleanShot_2023-06-28_at_18.29.59