Good luck being a decent front-end and a decent back-end developer. Besides their different nature. The volume and amount of knowledge is too much to be able to do both at a decent level unless you sacrifice your personal life or you are some sort of super talented nerd. If you dedicate 24 hours a day to both, there will always be someone who will dedicate theirs to only one. You can't beat that competition and it is…
I have become a generalist at a company that definitely has distinct frontend and backend teams. I started as backend dev but started doing frontend work too. I have found myself in great demand due to my unique role at the company.
Since I know a lot about the entire tech stack, I can act as a routing agent for product managers and other non-developers. They ask me questions, and I can give them a pretty good answer. If they need something done, I can refer them to the specialist who wrote the code that needs changed.
When I am coding small tasks, I can write both sides of an API much faster than it would take two devs to negotiate the requirements. Communication is a time sink. Rather than writing emails or tasks requests, I can just write code and be done. There is a threshold though where it is better to split the work. There is only so much I can hold in my head at once. But even then, I find I am better at communicating because I know how both sides work.
Does the project have a nasty bug that needs tracking down? The generalist can lead an investigation the whole stack, asking specialists when needed. Last week I solved what our CTO referred to as "the ninja bug" that had plagued another team for months. The root problem was on the frontend (ios client), and I pushed an instant fix by updating our server code to compensate.
Lastly, some companies have skunkworks projects with very small teams. Being able to own both sides of a task means fewer people required to do it. I have become the goto guy for whipping up prototypes. I typically work directly with our CEO to create a proof of concept as fast and cheap as possible. When things look promising, we bring on more specialized devs and I lead the project.
You may not want to be exactly 50/50, but definitely be aware of how the other side lives. And dont be afraid to ask for a role change to broaden your skill set!