I had this realization when I last changed jobs. What I hate is not necessarily to have a boss. It is working with a large group of people.
Large projects with a lot of devs and dedicated support people (PMs, designers, usability researchers, data analysts, etc, etc) just drain the life out of me. To get anything done and agreed becomes a nightmare, changes come from other parts of the org that you disagree and/or don't understand and/or don't see coming (and now affects your work). Lack of ownership of your own stuff and having someone else having ownership of the stuff you need to use is another huge problem.
It is not at all the size of the company (although this usually is tied hand-in-hand). It is about the size of the _project_ (including any dependencies to external systems, people or other parts of the org). Anything beyond 5 devs one designer and one PM already starts to feel soul-crushing.
Unfortunately the golden age of software is over and now anything of note eventually needs a huge team. Out of curiosity I checked Linear (the project management tool) Linkedin which I consider the apex of good, focused software. They employ 135 people, of which 40 are developers.