What can be much more manageable is to have comfortable cubicles for everyone (not the cramped desks with dividers, which is what probably gave cubicles the bad rep), and also have many small and large meeting rooms where people can congregate and collaborate in. This has the benefit of defaulting to semi-private workspaces which can easily scale, and moves the noisy collaborative areas to closed rooms, so that they don't bother anyone else. The smaller rooms could even serve as rotating private offices, if needed, that anyone can book for a limited period of time.
But the open floor office only has practical drawbacks, and definitely has to go. It only got popular because it's really the cheapest option for companies; just place some desks, chairs and monitors in a huge space, and sell it as "collaborative". But if they really want to entice people to come back to the office, they need to invest in better working conditions.