The new actor and director decided to portray Dumbledore differently.
Dumbledore in the first two films was played by the late Richard Harris; Dumbledore in the rest of the films was played by Michael Gambon. Gambon didn't even try to imitate Harris's portrayal, or to play Dumbledore as described in the books (in fact, he didn't even read the books before taking on the role) - he brought his own style to the role of Dumbledore, regardless of the fact that it conflicted with the Dumbledore of the first two films. As he said in an interview:
To what extent did you have to inherit Richard Harris's performance?
Michael Gambon: No one ever spoke to me about it. Not a word. On the first film I did which was directed by Alfonso Cuaron I walked in there and I'm naturally Irish and my first accent is Irish, I will speak Irish with my parents, and I played just a slight touch of Trinity College Dublin. That light lilt. I did that and Alfonso said, "What's the accent here?" I said, "Irish." He said, "That's OK." And no one's ever mentioned it. I'm a little bit more camp, I think, a bit lighter. A bit more ethereal.
The director of the third film, Alfonso Cuaron, has also commented on the change of actor for Dumbledore, in this interview:
[Gambon] was, in retrospect, a great choice. He’s similar enough that it didn’t feel jarring but at the same time he brings his own thing. It’s a slightly different Dumbledore than it would have otherwise been, isn’t it?
Alfonso Cuarón: It is slightly different. From the get-go we made changes to give the continuity, but at the same time it was not about imitating Richard Harris. That would be so bad for both: for Richard and for Michael. Richard was very regal - as Dumbledore is described in the books - and very beautiful, and we wanted to do it more hippyish, cheekier and a little more shabby. And sometimes more distracted.
TL;DR: both the new actor and the new director wanted Dumbledore portrayed differently in the 3rd film, and then they stuck with that version of Dumbledore for the later films.
In-universe, no explanation for Dumbledore's apparent abrupt change of appearance was ever given.
Answer heavily based on this answer to a similar question on another SE site.