It really depends on the culture. When I write code, I close all chat apps, and check them for notifications every 2-4 hours. Everyone who works with me knows it and understands the reasons behind it. They have my phone number in a case of a real emergency.
You're in charge of your own productivity and your own work patterns. Train your coworkers to respect them.
You're in charge of your own productivity and your own work patterns. Train your coworkers to respect them.