The sentence you wrote is correct! Here's why:
- After woodpeckers leave, tells when something happens — once the woodpeckers go away.
- other birds may use their nests for many years. means other birds might live in the nests for a long time.
So, the sentence: "After woodpeckers leave, other birds may use their nests for many years." is clear and grammatically right. Good job!