In WWII, I think an airframe became obsolescent when newer designs arrived that put the older designs at a performance disadvantage most of the time. By way of example, the early Spitfires were basically 350 – 360 mph aircraft and when newer designs came along that were 20 -40 mph faster at normal operatine altitudes, then the new designs could choose when to engage or disengage with the early Spitfires. They became obsolescent at that time and were upgraded to maintain parity or better.
When they could no longer be upgraded to maintain at least some advantages, an airframe became obsolescent in that role unless it was deployed in numbers. That is not to say it could not have been used in other roles. By deployed in numbers, think of the P-51D Mustang. By late 1944, there were some German fighters that could outperform it, but not when confronted with hundreds of them in one mission. There were simply too many "friends" around and the P-51D was effective until the end of the war despite being outperformed at times.
I think both the Bf 109 and the Spitfire were still effective at the end of the war, but both had reached their development limits or were very close to it. The Bf 109 K models, while they were capable of 450 mph speeds, simply could not fight there and were either running to or from a fight if they were going that fast. If they wanted to actually fight, they were 280 - 340 mph fighters. The P-51D could fight at 450 mph. The Spitfire could also fight there, but had little to no development potential left. It and the Bf 109 could have endured for another couple of years if the war had dragged on, but would have been increasingly hard put to match any later designs.
If the war had dragged on another year or so, the P-51H, Grumman Bearcat, and Hawker Sea Fury come to mind along with the P-80, Meteor, and Vampire. The Bf 109 would not really be able to cope with any of these pistons, and any jet was simply too fast for the 109 (it wasn't alone there). The 3 pistons above were very good and the Douglas A-1 Skyraider would have sealed the fate of any other American attack planes and would rapidly have replaced whatever was being used for attack in American service.
The Spits would have remained effective as defensive fighters for awhile but, again, I think the development potential was simply about done. Maybe not, but I remain unconvinced otherwise. The Spitfire definitely had better performance than the Bf 109 in the fighter role by late 1944. Just my opinion and I don't really want to argue it. If you disagree, that's fine. I just think there was no Bf 109 that was the equal of the Spit XIV or later mark as a fighter.
The P-40 was obsolescent early in the war but, when placed in areas where the latest designs would not be found, was effective. There were no large populations of late designs in North Africa, the Med, or many places in the Pacific, so the P-40 was effective there. It was not a front-line fighter in the ETO by mid-1943. So they found places where the obsolescent P-40 could be used.
They did the same for planes like the Bf 110, which was obsolete as a day fighter but came into its own as a night fighter. The key was the role to which a design was assigned. If the people in authority continued to use a design past it's prime in the primary role, the "obsolescent" would become "obsolete" and simply be overwhelmed by the opposition. If the people in charge were observant and assigned obsolescent airframes to new roles where they could still perform well enough to be effective, then the older design could soldier on for awhile and maybe even do well at it. Many did.