If it’s an amicable departure 3-4 weeks can be a lot less stressful for everyone.
6-8 weeks is kinda weird though, unless you‘re extremely senior and on critical path for a lot of things, or you‘re using up accrued PTO.
If you're a leader in a team, definitely give more notice. It's the professional thing to do. Something that the post -doesn't- say is that you should have a transition plan written down before you tell your boss, just in case you get cut off.
Of course they can still summarily kick you out the door, but it's a chance for you as a leader to do right by the team.
So don’t negotiate start date until you have an offer and are talking to the hiring manager. Save it to the end and you can say “well, I’m still not 100% sure about this offer, but I think this would work if you could push my start date out a bit…”
My thought is that if that worked for me for 2 weeks, it should also be more than enough for an IC.
On the other hand, the leadership folks I interact with always make only super high level decisions. Rarely does it get intricate. It's more important to know how to quickly assess the big picture and how to communicate. All lot of what a leader does and makes them uniquely leaders is not something that's based on acquiring company specific and product and infra specific knowledge accumulated across several years.
I rarely care if my manager leaves beyond the fact that I have to build trust with someone new. But ultimately they aren't super in the weeds on anything mission critical.
An engineer that can jump into an incident and immediately identify the problem on a code path because they have worked on it or around it intimately at some point does make a difference, but also just having a detailed mental model of how the system pieces interact is super crucial. Bus factor is a thing, even though it rarely is catastrophic. Lead time can help here.
Of course leaders leaving also is a challenge, but it's because of their unique charm, ability to grasp issues quickly and make sane decisions. But none of this can be transferred to a new guy, in 2 or 4 weeks or 8.