It isn't always a bad thing if you identify quite closely with your career, however if your circumstances within your career change unexpectedly it can make you quite vulnerable. Be sure to have a balance between the two and make sure this balance falls in line with your values.
Who was he, if not a high-powered lawyer? Had he wasted so many years working for nothing? Would he have had more friends and a happier family if he hadn’t spent all those nights at the office?
https://hbr.org/2019/12/what-happens-when-your-career-becomes-your-whole-identity