Have similar problem right now. and a bit surprised that I cant find solution on the internet using just php code.
Here’s the solution I made in case you still haven’t found the solution.
<?php
$sep = '|';
$spages = wp_list_pages('sort_column=menu_order&depth=1&echo=0');
preg_match_all('@<a href="(?<a>.*?)">(?<t>.*?)</a>@', $spages, $out);
$cnt_pages = count($out['a']);
for($i=0;$i<=$cnt_pages;++$i){
echo $out['t'][$i];
if($i<$cnt_pages-1){
echo $sep;
}
}
?>