Convergence Analysis of the Deep Galerkin Method for Weak Solutions