The solution I was taught as a child is to saw the hole square, put a section of 2×4 behind it spanning the hole, held in place with a drywall screw through the drywall on each side of the hole, cut a square chunk of drywall small enough to fit in the hole, put a drywall screw through the middle of it into the 2×4, and tape, mud, sand, and paint.
I suspect that this procedure is faster and easier than taking a 3-D scan of the hole, 3-D printing a PLA patch, and gluing it in, but it does require most of an hour and the appropriate materials on hand.