Many years ago, Taiwan would not let you in if you had a Chinese visa stamp
in passport ( or maybe it was the other way around). So Canadian High Commission
in HK would hold a second passport, you would go in , exchange the passport with
taiwan visa for a new one, get a Chinese visa issued in the new one in HK, then
enter China. On return to HK, go back and exchange the passports.
Only similar situation I can think of these days is Cuba, where USA will not let
you in with Cuban stamps in your passport. So the Cubans will stamp a piece
of paper instead.
If I need passport while applying for a visa, I will usually pay rush same-day fees
instead.