Suppose that $$y=f(x)+\epsilon$$ Where $\epsilon$ has mean $0$ and variance $\sigma^2_e$, independent of $x$.
Here is the composition of the mean-squared error into bias and variance:
$$\begin{align}\text{MSE} &=\mathbb E[(y-\hat f(x))^2]\\ &=(\mathbb E[\hat f(x)−f(x)])^2+\mathbb E[(\hat f(x)−\mathbb E[\hat f(x)])^2]+σ^2_e\\ &=\text{Bias }\quad\quad\quad\quad\quad\;\;+\text{Variance } \quad\quad\quad\quad\quad+ \text{ Irreducible Error}\end{align}$$
But here is an argument why there is no bias-variance tradeoff: Suppose we choose the correct function $\hat f=f$. Then
$\text{MSE}=\mathbb E[(y-f(x))^2]$. Using the law of total expectations this equals $\mathbb E\left[\mathbb E[(y-f(x))^2|x] \right]$. Now, because $\mathbb E[y|x]=\mathbb E[f(x)+\epsilon|x]=f(x)+0$, the expectation therefore equals $\mathbb E\left[\mathbb E[(y-\mathbb E[y|x])^2|x] \right]$=$\mathbb E[\mathbb E[(f(x)+\epsilon-f(x))^2|x]]$=$\mathbb E[\sigma^2_e]=\sigma^2_e$.
So by choosing $\hat f=f$, we have set both the bias and the variance to zero.
What is wrong with my argument?