No, unfortunately there isn't. Observe first of all that we can always choose $f$ to be linear when $n$ is fixed: if making one edit in some codeword causes a displacement of at most $f(1)$ in our cyclic ordering, then making two edits causes a displacement of at most $2\cdot f(1)$, making three edits causes a displacement of at most $3\cdot f(1)$, and so on. Thus, for fixed $n$ the function $f$ can be considered to be small.
However, we shall see that the value of $f(1)$ grows exponentially in $n$. Note that for $\delta = 1$ the question is precisely that of determining the circular bandwidth of the hypercube graph $Q_n$, which is defined as follows:
Definition. For $n,\ell\in\mathbb{N}$ we define $C_{n,\ell}$ to be the graph on the vertex set $\{0,\ldots,n-1\}$ where two vertices $i,j\in\{0,\ldots,n-1\}$ are joined by an edge if and only if
$$\min(i - j \bmod n \:, \: j-i \bmod n) \leq \ell. $$
For instance, $C_{n,1}$ is simply the cycle on $n$ vertices, and $C_{n,\left\lfloor\frac{n}{2}\right\rfloor}$ is the complete graph.
Now the circular bandwidth of a graph $G$ on $n$ vertices is defined as the minimum value of $\ell$ such that $G$ is isomorphic to a subgraph of $C_{n,\ell}$. The circular bandwidth of $G$ is denoted $\text{cbw}(G)$.
The circular bandwidth has the same order of magnitude as the regular (linear) bandwidth $\text{bw}(G)$:
- On the one hand, clearly we have $\text{cbw}(G) \leq \text{bw}(G)$.
- On the other hand, it is not too hard to show that $\text{bw}(G) \leq 2\cdot \text{cbw}(G)$ holds. The following proof is taken from P. Erdős, P. Hell, P. Winkler, Bandwidth versus bandsize, Graph theory in memory of G. A. Dirac, Annals of Discrete Mathematics 41 (1989) 117-130, though the result might have been known earlier. If $n$ is even, we number the vertices of the cycle graph $C_{n,1}$ in the following manner:
$$1,3,5,7,\ldots,n-3,n-1,n,n-2,\ldots,6,4,2.$$
Similarly, if $n$ is odd we number the vertices of the cycle graph $C_{n,1}$ by
$$1,3,5,7,\ldots,n-2,n,n-1,n-3,\ldots,6,4,2.$$
This shows that the bandwidth of $C_{n,1}$ is at most 2. Thus, the bandwidth of the graph $C_{n,\ell}$ is at most $2\ell$, which shows that $\text{bw}(G) \leq 2\cdot\text{cbw}(G)$ holds for any graph $G$.
The (linear) bandwidth of the hypercube graph $Q_n$ is known: see original paper by Harper, Wikipedia and OEIS sequence A036256. Specifically, we have
$$ \text{bw}(Q_n) = \sum_{m=0}^{n-1} \binom{m}{\left\lfloor\frac{m}{2}\right\rfloor}. $$
Of course these central binomial coefficients grow exponentially in $n$. Indeed, OEIS gives the following approximation:
$$ \text{bw}(Q_n) \sim \frac{2^{n+\frac{3}{2}}}{\sqrt{\pi n}} \cdot \left(1 + \frac{(-1)^n}{12n}\right). $$
By the above estimate, the circular bandwidth is at least half of this, so it also grows exponentially. This shows that you cannot do much better than the lexicographic order. (Interestingly, Harper claims that the lexicographic order minimises the average absolute difference of numbers assigned to neighbouring vertices, rather than the maximum absolute difference for the linear bandwidth.)
In summary: $f$ is linear in $\delta$ but exponential in $n$.