The hard X-ray luminosity function of high-redshift (3 < z ≲ 5) active galactic nuclei