Dependence of decidability on the encoding of Turing machines
For a given computable $f$, the decidability of $L_f$ is independent of the encoding of Turing machines if and only $f$ is eventually injective (i.e., there exists a finite $X\subseteq\def\N{\mathbb N}\N$ such that $f\restriction(\N\smallsetminus X)$ is injective, or equivalently, $\{\def\&lt;#1&gt;{\langle#1\rangle}\&lt;n,m&gt;:n\ne m,f(n)=f(m)\}$ is finite).

If $f$ is computable and eventually injective, then $L_f$ is undecidable for any encoding.

Assume for contradiction that $L_f$ is decidable. Then
$$\{m\in\N:\exists n\in\N\:(f(n)=m\land n\notin L_f)\}$$
is r.e., hence it is accepted by infinitely many Turing machines; in particular, using the assumption, it is accepted by a TM $M$ such that $f(n)\ne f(\&lt;M&gt;)$ for all $n\ne\&lt;M&gt;$. Then
$$\&lt;M&gt;\in L_f\iff M\text{ accepts }f(\&lt;M&gt;)\iff\&lt;M&gt;\notin L_f,$$
a contradiction.

If $f$ is not eventually injective, then the decidability of $L_f$ depends on the encoding.

As shown in Aryeh’s answer, $L_f$ is undecidable under the standard encoding, hence it suffices to exhibit an encoding that makes $L_f$ is decidable. Let $\{M_m:m\in\N\}$ be any enumeration of TMs, and define $X\subseteq\N$ by
$$n\in X\iff|\{m&lt;n:f(n)=f(m)\}|\text{ is even.}$$
We define a new enumeration $\{M'_n:n\in\N\}$ by
$M'_n=M_{m(n)}$, where $m(n)$ is defined by induction on $n$:
$$m(n)=\begin{cases}
  \min\bigl\{m\in\N\smallsetminus\{m(i):i&lt;n\}:M_m\text{ accepts }f(n)\bigr\},&amp;\text{if }n\in X,\\
  \min\bigl\{m\in\N\smallsetminus\{m(i):i&lt;n\}:M_m\text{ does not accept }f(n)\bigr\},&amp;\text{if }n\notin X.
\end{cases}$$
To see that $\{M'_n:n\in\N\}$ indeed enumerates all TMs, assume for contradiction that $m$ is least such that $m\ne m(n)$ for all $n\in\N$. Since $f$ is not eventually injective, there are $n&lt;n'$ such that $f(n)=f(n')$ and $\{0,\dots,m-1\}\subseteq\{m(i):i&lt;n\}$. We may assume $n'&gt;n$ is smallest such that $f(n')=f(n)$, which implies
$$n\in X\iff n'\notin X.$$
Thus, either $n''=n$ or $n''=n'$ satisfies
$$M_m\text{ accepts }f(n'')\iff n''\in X,$$
which implies $m(n'')=m$ by the definition of $m(n'')$, a contradiction.
Thus, we may define an encoding of TM by $\&lt;M'_n&gt;=n$, and then it follows from the definition that
$$L_f=X,$$
which is decidable.

The answer above assumes that an encoding of TM has to be injective; this is not specified in the OP, but I suppose this is just an omission, as I fail to see how something that assigns the same code to two different TM can be considered an “encoding” of TM.
Anyway, if we allow non-injective encodings, the answer is that the decidability of $L_f$ depends on the encoding for every $f$: it is undecidable under the standard encoding by Aryeh’s answer, while it is trivially decidable (because finite) for the constant encoding $\&lt;M&gt;=0$.