I finally figured this out. It was actually a combination of OhMyREPL and the system image compilation that caused the issue. But the solution is much simpler than expected, even though it is a bit fragile and could break with future releases of OhMyREPL.
This needs to go in the startup.jl, in the atreplinit() block:
OhMyREPL.Prompt.NEW_KEYBINDINGS["^W"] = function (s,o...)
LineEdit.edit_kill_region(s)
OhMyREPL.Prompt.rewrite_with_ANSI(s)
end
This is because OhMyREPL already replaces the default keybinding with its own, and we need to override that.