Yoast, rank math, custom fields, it doesn't matter. In fact you ask if is a good practice to have <h1> (given by the wordpress title) different than the <title> (added by any SEO plugin). First of all, having them the same is just an over-simplification brought by the major blogging platforms. Second, like most here already said it: depends how you do it, but there is no policy or guideline saying h1 and title should be the same. Surely, they must be related though :)