You can try this AutoHotKey macro:
Sleep::msgbox Sleep key is disabled.
But AutoHotKey help for Sleep key also says:
Note that the sleep key on some keyboards might not work with this.
This means, that on some keyboards, the above macro can catch keypress of Sleep key and redirect its action but on other keyboards it is not possible. If you find out that your computer goes to sleep despite this macro (I found this on my Lenovo), then perhaps the only thing you can do is to completely disable sleep mode in Windows. But I am not sure if you want go that far.
Note: simply setting of Sleep key action in Power Options to Do nothing might not help, on my laptop this setting does not disable sleep button, but it still works as before. This is why I wrote that the only solution can be disabling the entire sleep mode.