Affine Yangians and some cosets of non-rectangular $W$-algebras