Disorder-driven phase transition in the second-order non-Hermitian skin effect