If you need to put vertices on the same level, the alignment tools aren't always the best option.
This video explains a couple other ways that are similar but use the 3D cursor to align. https://www.youtube.com/watch?v=Hwnl_3trS3M
More about using the 3D cursor from Blender Help - https://docs.blender.org/manual/en/latest/editors/3dview/3d_cursor.html