Researchers have settled the question of whether it’s better to work from home or the office