Tricky. Pages that do have that mechanism are usually annoying af. Because they will ask you for confirmation everytime you leave the page. Not just ctrl-w. Some pages do save the content of your edit box - or maybe the browser does. So if you re-open it quickly, some changes might still be there.
You can install a browser extension for blocking ctrl-w. If you have this habbit, it does not only affect writing on itch.
You could also have a ahk script remapping ctrl-w while the browser is active.
#IfWinActive ahk_exe chrome.exe ^w:: Send {Control Down}{Backspace}{Control Up} return #IfWinActive