In oncology RWE, the index date is often a progression event or the start of a new line of therapy. Without explicit target trial specification (eligibility, treatment strategy, time zero, per-protocol handling), you will misclassify immortal time and switchers. It is not a risk; it is a certainty.
The fix is not heroic statistics after the fact. It is writing down the trial you wish you could run before you touch the data: who would have been eligible, what strategies are being compared, when the clock starts, and what happens to people who deviate.
Use cloning, censoring, and weighting when the strategy is "initiate and remain on second-line therapy for six months." See the target-trial-emulation and clone-censor-weight entries in the repository for the code patterns in Python, R, and SAS.