When I'm doing something that's both interesting and challenging I can happily ignore literally everything else until I'm done. I think most people are very similar; phones and games and Slack messages are only a distraction if you're just not that into what you're supposed to be doing. If it happens a lot you might need to address that problem.