It won't be obsolete. As the American, Chinese, and Russian Air Forces are now realising, you cannot have a large air force comprised exclusively of fifth generation fighters unless you are ready to spend truly absurd amounts of money. They are considerably more expensive than older aircraft, and the imposition of stealth means they have to compromise on things such as payload.
Similarly, AMCA will not be a one-size-fits-all replacement for all our older aircraft, and in a 'clean' configuration, would be close to a 5th generation fighter in most aspects. Hence, it would also be used in a similar manner to what the F-35 is proposed to be used as: A guiding beacon for stand-off munitions fired from 4.5th generation aircraft from increased ranges.