Three questions have been asked previously on this topic. First, there was Proving The Extension Lemma For Vector Fields On Submanifolds, asked over 10 years ago (!), which did not copy the problem statement exactly correctly. What was left out was that the embedded submanifold $S\subseteq M$ could actually be a submanifold with boundary. When I tried to work the first part of this problem, the solution given in the accepted answer to the referenced question seemed to not work when $S$ had a boundary. The second question asked previously on this topic was Lee book introduction to smooth manifold problem 8.15, which correctly stated the problem as printed in the book. The OP of this question wrote that they "could manage" the first part of the problem. Unfortunately, the OP didn't share the proof they had. (Maybe the margin was too small to contain it.) The OP went on to say that they were asking for help with the reverse direction of the second part of the problem. Interestingly, the one answer given for this question did not address what the OP originally asked for, but rather gave a claimed proof for the first part. However, there seems to be a technical detail missing from the answer which has stymied me. The third question asked earlier was Better proof that vector fields on submanifolds extend globally iff submanifold is closed, which didn't go into the proof of the first part of the problem in either the question or the answer.
Here's the technical detail in the answer to the second question that troubles me. (I'm paraphrasing the answer given): $n=\dim M$, $k=\dim S$, $X\in\mathfrak{X}(S)$, $p\in S$, $(U_p,\phi_p)$ is a smooth slice (or half-slice) chart centered at $p$ for $S$ in $M$, $V_p=S\cap U_p$, $\pi\colon\mathbb{R}^n\to\mathbb{R}^k$ is the projection on the first $k$ coordinates, $\psi_p=\pi\circ\phi_p|_{V_p}$, $(V_p,\psi_p=(x^i))$ is a smooth chart centered at $p$ for $S$, and $X$ is expanded as $$X|_{V_p}=X^i\frac{\partial}{\partial x^i},$$ where for $i=1,\dots,k$, $X^i\colon V_p\to\mathbb{R}$ is a smooth function on $V_p$ as an open submanifold with or without boundary of $S$. Due to the slice condition, $V_p$ is also a closed subset of $U_p$. At this point the answer suggests that we can use the Extension Lemma for Smooth Functions (Lemma 2.26 in Lee ISM) to extend $X^i$ smoothly to $U_p$. But I don't see how the hypotheses of that lemma are met in this case. Specifically, one needs to show that $X^i$ is smooth on $V_p$, and I'm having a hard time doing that. All my attempts fail because given a point $q$ in $V_p$ (or even some subset of $V_p$), I can't seem to find a neighborhood of that point in $U_p$ on which a smooth function is defined which agrees with $X^i$ in the appropriate overlap set.
So my question is, how do you fix (or get around) this problem? Note that I am not asking about a complete solution to Problem 8-15. I'm only requesting help with the first part, and only of the part before we bring in the smooth partition of unity. That is, I just want to be able to prove that there is a smooth extension of $X^i$ to $U_p$. I also understand that it would not hurt to restrict $V_p$ first if necessary, so long as it still contains $p$.