It seems the ENCRYPT function works very differently on Linux from on macOS. I wonder why?
set @salt := SHA2(RAND(), 512);
select ENCRYPT('abc', CONCAT('\$6\$rounds=5000$', @salt));
Linux 5.4.174-2-pve / Mariadb 10.7
$6$rounds=5000$36fcf04d0f759de9$eZedOjHbDve6bomhxF95pzFUajCzFGgnNxh8JapGZlCb5NzzT2ze96hhO8s803zpPGMP4L48hhBm.6cHAv6Op/
macOS 12.4 / Mariadb 10.8
$6G/aJp5H5PCs