The fusion welding process of metallic components, such as using gas tungsten arc welding (GTAW), is often accompanied by detrimental deformations and residual stresses, which affect the strength and functionality of these components. In this work, a phase-field model, usually used to track the states of phase-change materials, is embedded in a thermo-elastoplastic finite element model to simulate the GTAW process and estimate the residual stresses. This embedment allows to track the moving melting front of the metallic material induced by the welding heat source and, thus, splits the domain into soft and hard solid regions with a diffusive interface between them. Additionally, temperature- and phase-field-dependent material properties are considered. The J2 plasticity model with isotropic hardening is considered. The coupled system of equations is solved in the FE package FEniCS, whereas two- and three-dimensional initial-boundary-value problems are introduced and the results are compared with reference data from the literature.