Completing the discussion under Will Sawin's answer. The question has been answered completely and affirmatively by Ben-Bassat and Temkin in their paper "Berkovich spaces and tubular descent" (Adv. Math. 2013), but one has to be careful when globalizing $\hat A$ and (especially) $\hat A[1/f]$.

(1) Beauville and Laszlo treat the non-affine case in the Corollary on p. 8 of their paper. However, what they do to define $\hat X$ (by taking the relative spec over $X$ of $\varprojlim \mathcal{O}_X/I_Z^n$) seems flawed for the reason that completion does not commute with localization, e.g.
$$ (\varprojlim k[[t]][x]/(t^n))[1/x] \neq \varprojlim k[[t]][x, x^{-1}]/(t^n). $$
Therefore there does not exist a quasi-coherent $\mathcal{O}_X$-algebra whose value on an affine open $U= \operatorname{Spec} A$ is $\hat A$ (completion w.r.t. the ideal of $U\cap Z$ in $U$). See also paragraph 1.3 (p. 219) in Ben-Bassat and Temkin.

(2) Clearly, the global version of $\hat A$ should be $\hat X$, the formal completion of $X$ along $Z$, which is a formal scheme but not a scheme. It is more delicate to define the "tubular neighborhood" $W = "\hat X \setminus Z"$ (quotes because, taken literally, this is the empty formal scheme). The answer is that $W$ is an object of rigid analytic geometry, to which there are several approaches. Ben-Bassat and Temkin choose to work in Berkovich spaces, but discuss the other approaches as well in Section 4.6. They remark that whatever framework we choose, the category of coherent sheaves or vector bundles will be the same.

(3) Their main result is:

**Theorem (2.4.8).** Let $X$ be a scheme of finite type over a field $k$, and let $Z$ be a closed subscheme of $X$. We denote by $\hat X$ the formal completion of $X$ along $Z$, and by $W$ the corresponding Berkovich space (which the authors define). Then
$$ \operatorname{Coh}(X) \stackrel{\sim}{\longrightarrow} \operatorname{Coh}(X\setminus Z) \times_{\operatorname{Coh}(W)} \operatorname{Coh}(\hat X). $$

Patching theorems of projective modules(link). (He says in the second half the introduction that it was also known to Karoubi and Swan.) $\endgroup$ – Minseon Shin Sep 16 '19 at 9:07