Be Unavailable Sometimes
This is similar, but not quite the same as really being on vacation when you're on vacation. Being unavailable means that during your normal work week there are times when you won't be providing a quick response. And it's important to enforce this.
Many have us have come to expect that when we want information or an answer we should be able to get it almost immediately. With email and Slack and other means of communication on everybody's phones at all times nobody ever has to be out of reach. These can be great tools but their existence means that you need to set your own boundaries.
Especially as a software engineer you need chunks of uninterrupted time to get things done. It's more than ok, it's critical to be able to put up a Slack status that says "Slow to respond, coding" if you actually want to get non-trivial work done. It's ok to not respond to non-emergency after-hours messages until the next day. Reasonable boundaries like this encourage better project planning that can't be held up by adhoc needs, plus it sets a much more reasonable working culture. This can be especially important for those who work from home as the lines between being "at work" and not can be blurry.
Obviously if you are on call or a real emergency pops up, making yourself available is important. But set your boundaries and do your best to hold them. Be unavailable. Sometimes.