When sharing a small office my coworkers and I would talk a fair bit. Later I moved to a newly-remodeled space and I’ll give my coworkers credit: it was very quiet there, much like a library.
Which meant there was little reason to go into the office.
I think for collaboration, you want a nice team room (much like a meeting room) where everyone there is actually working together on the same project.