Let $\Omega \subset \mathbb R^n$ be an open subset and $F\subset \Omega$ a (relatively) closed set. Suppose that the projections $\pi_x, \pi_y:\Omega\times\Omega \longrightarrow \Omega$ are proper in $F$, that is for every compac subset $K\subset \Omega$, the set
$$ \{(x,y) \in F : x\in K \ \mbox{or}\ y \in K\} $$
is compact (in other words, the restrictons of the projections to $F$ are proper maps). Then can we find $f \in C^\infty\left(\Omega\times\Omega\right)$, $f$ equal to $1$ in a neighborhood of $F$, such that the projections $\pi_x, \pi_y:\Omega\times\Omega \longrightarrow \Omega$ are proper in the support of $f$?
I know that the answer is true when $F$ is, for example, the diagonal $\Delta=\{(x,x) : x \in \Omega\}$. For instance we can take $\{U_j\}_{j\in\mathbb N}$ a locally finite open cover by relatively compact subsets of $\Omega$ and we work with partitions of unity associated to $\cup_{j\in\mathbb N} U_j\times U_j$ (this is the neighborhood of $\Delta$). But I am using a very specific property of the diagonal in my proof that I do not have in the general case. Any hint?
Although I have not found an answer for my question I think that I have proved a weaker result that is enough for me.
Let $K_1 \subset \ \mbox{int}\ K_2 \subset K_2 \subset \ldots$ an exhaustion of $\Omega$ by compacts. For each $j\in\mathbb N$ we have that the set
$$ \tilde K_{j} = \{(x,y) \in F : x \in K_j\ \mbox{or}\ y\in K_j\} \subset \Omega\times\Omega $$
is compact. Hence we can find $0<r_{j}$ such that
$$ \tilde K_{j} + B(0,r_{j}) \subset \Omega\times\Omega, $$
where $B(0,r_{j})$ is the ball with center $0\in\mathbb R^{2n}$ and radius $r_{j}$. We are using the maximum norm here. We also can suppose that $r_j\longrightarrow 0$. We have
$$ \overline{\tilde K_{j} + B(0,r_{j}/2)} \subset \Omega\times\Omega. $$
Let
$$ A = \bigcup_{j\in \mathbb N}\tilde K_{j} + B(0,r_{j}/2). $$
It follows that $A \subset \Omega\times\Omega$ is a open set that contains $F$. Let $\{f,g\}$ be a partition of unity associated to the family $\{A,\Omega\setminus F\}$ (with $\mbox{supp} f \subset A$).
Claim: for every compact $K \subset \Omega$, the set
$$ B_K=\{(x,y)\in \mbox{supp}f : x \in K\ \mbox{or}\ y \in K\} $$
is $\textit{relatively}$ compact in $\Omega$. We first observe that it is sufficient to prove the result when $K=K_j$ for some $j\in\mathbb N$. Notice that
$$ B_{K_j} =\tilde K_{j} \cup \{(x,y) \in \mbox{supp}f \setminus F : x \in K_j \ \mbox{or}\ y \in K_j\}. $$
Since $\tilde K_{j}$ is compact, we have to prove that $\{(x,y) \in \mbox{supp}f \setminus F : x \in K_j \ \mbox{or}\ y \in K_j\}$ is relatively compact, or that this set is bounded and its closure (in $\mathbb R^n$) is a subset of $\Omega\times\Omega$.
(1) $\{(x,y) \in \mbox{supp}f \setminus F : x \in K_j \ \mbox{or}\ y \in K_j\}$ is bounded:
Suppose that this set is not bounded. Then we can find a sequence $(x_n,y_n)$ in this set such that $|(x_n,y_n)|$ tends to $\infty$ when $n$ tends to $\infty$. Since $x_n \in K_j$ or $y_n \in K_j$ for each $n$, we can suppose that $x_n \in K_j$ for all $n$ and that there exists $x_0 \in K_j$ such that $x_n \longrightarrow x_0$.
Now we recall that $(x_n,y_n) \in \mbox{supp}f \subset A$. Hence we can find $(z_n,w_n)\in \tilde K_{\ell_n}$ such that $|(x_n,y_n)-(z_n,w_n)|<r_{\ell_n}/2$.
Case 1: $\{\ell_n : n \in\mathbb N\}$ if finite. In this case we can suppose that there exists $\ell_0\in\mathbb N$ such that $(z_n,w_n) \in \tilde K_{\ell_0}$ and $|(x_n,y_n)-(z_n,w_n)| < r_{\ell_0}/2$ for all $n$. In particular,
$$ |y_n| \le |(x_n,y_n)-(z_n,w_n)| + |w_n|, $$
which is bounded since $\tilde K_{\ell_0}$ is compact. We have reached a contradiction.
Case 2: $\{\ell_n : n \in \mathbb N\}$ is infinity.
In this case we have
$$ z_n \longrightarrow x_0 \ \mbox{and} \ |w_n| \longrightarrow \infty. $$
Since $z_n \longrightarrow x_0$ and $x_0 \in K_j \subset \mbox{int} K_{j+1}$ we can suppose that $z_n \in K_{j+1}$ for all $n$. Since $(z_n,w_n) \in F$ for all $n$ we have that
$$ (z_n,w_n) \in \tilde K_{j+1}, \forall n \in \mathbb N, $$
which is compact. But this leads us to a contradiction with the fact that $|w_n|$ is unbounded. The proof of (1) is complete.
(2) Let $(x_0,y_0)$ be a point of the closure of $\{(x,y) \in \mbox{supp}f \setminus F : x \in K_j \ \mbox{or}\ y \in K_j\}$.
So $(x_0,y_0) = \lim (x_n,y_n)$, where $(x_n,y_n) \in \{(x,y) \in \mbox{supp}f \setminus F : x \in K_j \ \mbox{or}\ y \in K_j\}$ for all $n$. As before we can find $(z_n,w_n)\in \tilde K_{\ell_n}$ such that $|(x_n,y_n)-(z_n,w_n)|<r_{\ell_n}/2$.
Case 1: $\{\ell_n : n \in \mathbb N\}$ is finite.
We take $\ell_0$ such that $(z_n,w_n)\in \tilde K_{\ell_0}$ and $|(x_n,y_n)-(z_n,w_n)|<r_{\ell_0}/2$ for all $n$. Since $\tilde K_{\ell_0}$ is compact we can suppose that there exists $(z_0,w_0) \in \tilde K_{\ell_0}$ such that $|(z_n,w_n)-(z_0,w_0)|$ tends to $0$. Hence $|(x_0,y_0)-(z_0,w_0)| \le r_{\ell_0}/2$ and we have that $(x_0,y_0)\in\Omega\times\Omega$.
Case 2: $\{\ell_n : n \in \mathbb N\}$ is infinity.
In this case $(z_n,w_n)\longrightarrow (x_0,y_0)$. We can suppose that $x_n \in K_j$ for every $n$, and then $x_0 \in K_j$. Hence we can suppose that $z_n \in K_{j+1}$ for every $n$ and since $(z_n,w_n)\in F$, it follows that $(z_n,w_n) \in \tilde K_{j+1}$ for every $n$. Therefore $(x_0,y_0) \in \tilde K_{j+1} \subset \Omega\times \Omega$.