I had this problem from the first day I bought the Surface Pro 7, Core i7 Black 512GB.
I found out: tablet is over heating and causing the random shutdown specially when it is being charged.
I somehow control this random shutdown by setting the control temperature method in power setting to passive. But yet the problem exists, but it is very rare now.
I am waiting for the fix now.