Back when I was an intern, I worked incredibly hard, often times with late hours. Aside from the personal downside of burning yourself out, is there any other way this can hurt you career? Can it skew the team's perspective of you in a bad way?
So you can't really be punished for overworking and on the surface, the benefits are mainly positive. You will almost certainly get more impact and credit for your work.
However, if you have a mature team, especially a mature manager, your perception can be a bit off, particularly around your growth.
Here's an example (assuming a company that evaluates engineers well): You can get a good performance review as a mid-level engineer in 2 ways.
The first is just doing more of what's expected for a mid-level engineer, churning out 2x more projects and code than the average mid-level engineer.
The second is making progress towards the senior level by showing new, deeper behaviors like project management, mentorship, and more.
In the example, both have the same rating, but the first option involves getting carried by overwork.
Going back to the perception, this means that you're overworking, it could be negative sign to your manager that you're not ready to move to the next level as the way you're performing is inherently not sustainable. I knew a great manager at Meta who thought this way, and I agree.