Currently, there seems to be no convincing evidence to say that alternating between shampoos prolongs their effectiveness in treating dandruff.
1) According to the Scientific Committee on Cosmetic Products and Non-food Products Intended for Consumers by European Commission, 2012:
There is at present no scientific evidence of development of
resistance or cross-resistance of fungi to Ketoconazole, if
Ketoconazole is used in cosmetic dandruff shampoo at concentrations up
to 2 %.
2) Drugs.com, 2019 and FDA.gov, 2012 also do not mention any resistance to ketoconazole topical.
3) In this 2017 study, (Fig 2), they've observed that some strains of Malassezia fungi are resistant to ketoconazole, but this seems to be intrincis resistance, not the one that develops with repeated use, so alternating between shampoos would not work.
4) One source suggests that some people with seborrheic dermatitis can be resistant to topical treatments:
For patients with persistent SD resistant to topical agents, oral
antifungals may be an option. Oral itraconazole given in a dose of
200mg/day for one week, followed by a maintenance dose, resulted in
clinical improvement of SD symptoms in two open-label trials.
...but again, alternating shampoos here would not likely help.
5) Several comprehensive review articles about treatment of dandruff do not even mention "resistance" to anti-dandruff shampoos or the need for "alternation" of shampoos:
6) Another source claims that a combination, but not alternation, of substances could be used to circumverent resistance:
Cosmetic and personal care products (anti-acne, anti-dandruff,
anti-odorant, prickly heat talc, etc) use synthetic antimicrobials
like Triclosan, Farnesol, Zinc Pyrithione etc or herbal extracts for
the anti-microbial 'functional' benefit. The use of single
anti-microbial agent would pave way for emergence of resistance in the
cosmetically significant skin micro-organisms. To combat the
development of resistance and deliver the anti-microbial benefit, a
combination of synergistic antimicrobials can be used.
A couple of sources recommend alternating shampoos, but without any argumentation:
Mayo Clinic:
If one type of shampoo works for a time and then seems to lose its
effectiveness, try alternating between two types of dandruff shampoos.
Virginia Commonwealth University:
Alternating medicated shampoos on a daily basis may also increase
their effectiveness (eg, ketoconazole on Monday, zinc on Tuesday,
selenium on Wednesday, tar on Thursday, etc).