Slack is similar Shift enter in normal text. Enter in a code block, shift enter sends in a code block.

I just tested this on Slack (macOS) and it's not the case. Pressing Enter in a code block submits the message, just as it does for any message.