This is very simple and I'm probably missing something obvious but I can't seem to spot the mistake.
We know that $C^1$ functions on compact sets are Lipschitz.
Let $U \subset \mathbb R^n$ be open, $S \subset U$ be compact, and $f: U \to \mathbb R^m$ be $C^1$.
$f$ is Lipschitz,so $\exists M \in \mathbb R$ so that $|f(x)-f(y)| \leq M|x-y|$ for all $x,y \in S$.
But this also means that it's true for all $x,y$ in the interior of $S$. So $f$ is also Lipschitz with constant $M$ in the interior of a compact set. Compacts are closed and bounded, so only criterion for being the interior of a compact set is being bounded.
The conclusion is that $f$ is Lipschitz on bounded sets, as we can close it to get a compact set, there it will be Lipschitz with some constant, so it also must be Lipschitz with that same constant inside.
Is this correct? I don't see anything in the literature or online about it. Everything is just about compactness. Where is the mistake here?
Very important edit
I meant that $f$ is $C^1$ on an open set $U$ which contains compact set $S$, then $f$ is Lipschitz on interior of $S$.
Note that $\sqrt{x}$ is $C^1$ in $(0,1]$ (which is not compact) but this function is not Lipschitz in any bounded set $(0,a]$ with $0<a\leq 1$: if $(x_n)_n$ and $(y_n)_n$ are two sequences which go to $0^+$ with $x_n>y_n$ then $$\lim_{n\to +\infty} \frac{\sqrt{x_n}-\sqrt{y_n}}{x_n-y_n}= \lim_{n\to +\infty} \frac{1}{\sqrt{x_n}+\sqrt{y_n}}=+\infty.$$
On the other hand, if $f$ is $C^1$ in an open set $U$ which contains a compact set $S$, then $|f'|$ is continuous in the compact set $S$ and in $S$ it attains a maximum value $M$. Hence $f$ is Lipschitz in $S$ (and therefore also in its interior) with constant $M$.