Here is the Urysohn's Lemma for Normal Spaces taken from Munkres:
Let X be a normal space, let A and B be disjoint closed subsets of X. Let [a,b] a closed interval in the real line. Then there exists a continuous map $f: X \rightarrow [a,b]$ such that $f(x) = a \ \forall x \in A$ and $f(x) = b \ \forall x \in B$.
I have seen the proof for Locally Compact Hausdorff Version of Urysohn's Lemma:
Let $(X, \mathcal{T})$ be a locally compact Hausdorff topological space. If $K, F \subseteq X$ are such that $K \cap F = \emptyset$, $K \subseteq X$ compact and $F \subseteq X$ closed. Then there exists a continuous bounded function with compact support $f: X \to \mathbf{R} \in C_c((X, \mathcal{T}), \mathbf{R})$ such that $f|_F(x) = 0$ for all $x \in F$, $f|_K(x) = 1$ for all $x \in K$ and $0 \leq f(x) \leq 1$ for all $x \in X$.
My question is: Can we extend the Locally Compact Hausdorff version of Urysohn's Lemma to where $f|_F = a$ and $f|_K = b$ where $a \leq b$ are any real numbers? I tried following the proof for the LCH version of Urysohn's Lemma, but noticed that either the continuity condition or the compactly supported condition would fail if we just substitute $0$ with $a$ and $1$ with $b$. For reference, this is the proof I am following for the LCH version:https://www.math.ksu.edu/~nagy/real-an/1-05-top-loc-comp.pdf.
I thought at first if we could metrize a LCH space, then we could probably do something with the small wiggle room between $K$ compact and $F$ closed. However, this is not the case: Locally compact Hausdorff space is metrizable. Now I am thinking this might not be a true statement if we require the function to have too many nice properties? Any insights would be appreciated.
Update:
After some pondering, it was realized that the claim mustn't be true without some other conditions on $F$. In fact, if we require $f = a$ on $F$ for some $a \not= 0$, then it is not necessarily true that the function $f$ is compactly supported if $F$ is some huge closed set. The fact that we are asking $f$ to be compactly supported "contradicts" in general the requirement for $f \not= 0$ on $F$. The best that we could do is, perhaps, given by @user87375 below: Adding the constraint that $a = 0$ or requiring some more regularities on the set $F \subseteq X$.
As I said in the comments, it's easy to change the $0$ to $a$ and $1$ to $b$. But as you pointed out some care has to be taken to ensure that the new function is compactly supported.
Let $f: X \to \mathbb{R}$ be an Urysohn function for $K$ and $F$, so $f(K) = \lbrace 0\rbrace$ and $f(F) = \lbrace 1 \rbrace$. Moreover, $f(X) \subseteq [0,1]$ and $f$ has compact support. Now, let $\psi : \mathbb{R} \to \mathbb{R}$ be an order preserving homeomorphism with $\psi(0) = a$ and $\psi(1) = b$, and set $g = \psi \circ f$. Then $g(K) = \lbrace a \rbrace$ and $g(F) = \lbrace b \rbrace$. The question now is whether $g$ has compact support.
Observe that if $a \neq 0$ and $F$ is not compact, then $\operatorname{supp}(g) \supseteq F$ is not compact. But this is the only problematic case.
If $a = 0$, then $\operatorname{supp}(g) = \operatorname{supp}(f)$, so we're good.
If $F$ is compact, then forget about the $g$ we already made and argue as follows. Let $g_K$ be a compactly supported Urysohn function with $g_K(K) = \lbrace 0 \rbrace$ and $g_K(F) = \lbrace b \rbrace$. Then let $g_F$ be a compactly supported Urysohn function with $g_F(F) = \lbrace 0 \rbrace$ and $g_F(K) = \lbrace a \rbrace$. Provided $0 < a < b$ I believe $g = g_F + g_K$ should satisfy your criteria.
The case with $F$ compact and $a < b < 0$ is similar, but the case $a < 0 < b$ is a bit more annoying, so I don't want to write it down. However I think it should be doable using similar ideas.