Investigation of level crossing in the tetragonal paramagnet YbPO4 in ultrahigh magnetic fields up to 400 T