I noticed that in general, the statements $\vdash A\to B$ and "If $\vdash A$ then $\vdash B$" are not equivalent.$^1$
However, this shows that I have a faulty intuition:
I thought that I can interpret $\vdash A$ ($A$ is derivable without open assumptions) as "$A$ is true" without causing any harm.
Accordingly, I interpret "If $\vdash A$ then $\vdash B$" as "If $A$ is true, then $B$ is true", which is the same as $\vdash A\to B$.
I could just accept that I have to be more careful, but I was hoping that someone could comment on this and give me some additional insight.
$^1$ For example, consider $B=\forall _x A$: $$\text{If }\vdash A\text{, then }\vdash\forall_xA$$ is always true according to the rules of natural deduction, but of course $$\vdash A\to\forall_xA$$ can only be derived if $x$ is not a free variable of $A$ (otherwise we could derive absurd formulas).