Existence of Hermitian-Yang-Mills metrics under conifold transitions