Pokeman 6:
Jirachi Wish Maker
(2003)

Butler's plan to create a Groudon using Jirachi's power goes wrong, and he creates a monstrosity which destroys plant life just by being near, as well as eating Ash's friends.

Soon, Ash and Max are the only two left, and they free Jirachi who destroys the Fake Groudon.

Max and Jirachi share a tearful goodbye as the Pokemon returns to sleep for 1,000 years, May realizes she forgot to close the last door on her wish maker but doesn't mind, and Butler and Diane get together.

Thanks Mark I!