I refer to Stephen Cole Kleene, Mathematical Logic (1967 - Dover reprint : 2002).
At pag.108 he introduces the definiton of deducible from assumptions (in Predicate Calculus) with restrictions regarding the use of the $\forall$-rule :
"from $C \rightarrow A(x)$ to $C \rightarrow \forall x A(x)$" ($x$ not free in $C$) ,
on the vars that are free in the assumptions.
At pag.109 [Example 9] he makes the example of a (correct) deduction of $R \rightarrow \forall x P(x)$ from $\forall y (R \rightarrow P(y)$). From steps 5 and 6 in the deduction, we understand that y is not free in R (he applies $\forall$-rule with y).
At pag.110 he makes some comments on the restrictions on free vars and adds that :
we are not justified in saying $"R \rightarrow P(y) \vdash R \rightarrow \forall x P(x)"$. In fact, this is not true, since [by soundness and ref.to previous Exercise 20.2a (pag.107 - there is a misprint : the text has "Example"), is not the case that] $"R \rightarrow P(y) ⊨ R \rightarrow \forall x P(x)"$ were true.
But why we cannot simply justify $R \rightarrow P(y) \vdash R \rightarrow \forall y P(y)$ by the $\forall$-rule ? I think that the change in the bound variable is (as Kleene says in the same lines) is immaterial.
Added Dec,2 : The deduction $R \rightarrow P(y) \vdash R \rightarrow \forall y P(y)$ is not correct according to Kleene's definition [pag.108] of deduction (from assumptions) with all free variables held constant.
The correct interpretation of the $\forall$-rule is [see also Th.16, pag.96] :
"if $\vdash C \rightarrow A(x)$ then $\vdash C \rightarrow \forall xA(x)$" (x not free in $C$),
and not : "$C \rightarrow A(x) \vdash C \rightarrow \forall xA(x)$".
If we apply the $\forall$-rule to the assumption $C \rightarrow A(x)$ , we have the one-step deduction : $C \rightarrow A(x) \vdash ^x C \rightarrow \forall xA(x)$ (x varied), because x is not free in the assumption.