I think I have found the answer to my question: While deriving the Black-Scholes PDE, we write out the derivative price $f$ as a function of 2 things—the current time $t$ and the price of the underlying $S_t$. This is not to say that $f$ doesn't depend on other factors; it clearly depends on 5 other inputs $(r, \sigma, q, K, T)$. But the reason for writing out the derivative price as $f(t, S_t)$ is that $t$ and $S_t$ are the inputs which change with time—the other 5 inputs being constant.
Choosing to explicitly show the dependence on $t$ and $S_t$, while side-tracking the dependence on the other 5 inputs plays a crucial role: it reminds us that the change in the derivative price $df$ arises only out of the changes in time $dt$ and the changes in the price of the underlying $dS_t$.
So to answer the question: the price of a derivative will depend on multiple inputs. But if only two of those inputs—$t$ and $S_t$—change as we move ahead in time will the derivative price satisfy the Black-Scholes PDE. Let's look at some standard examples to clarify this thought.
1) In our model, the price of standard European options only change due to changes in $t$ and $S_t$, so they must satisfy the Black-Scholes PDE.
2) Barrier options depend on an additional input: the barrier level. Even though there is an extra input involved, we ask ourselves 'Does this input change as we move ahead in time?'. The answer is a resounding No, which makes us conclude—just like point (1)—that only two of the inputs, namely $t$ and $S_t$ are changing, making the price of a barrier option satisfy the Black-Scholes PDE.
3) Asian options also depend on an additional input: the average share price $A_t$ upto the current time $t$. Now this is an input—unlike the constant barrier level in point (2)—that does change as we move ahead in time. So the price of an Asian option no longer satisfies the Black-Scholes PDE. In order to find a PDE for Asian options, we will have to write out $f$ as a function of 3 inputs: $(t, S_t, A_t)$. Consequently, while finding the differential $df$, we will also have to consider $dA_t$—this will change the form of the PDE.