Hello
You have found wrong error root. Restore order is correct. Try with this function definition:
CREATE FUNCTION public.boxrange(bigint, bigint) RETURNS box
LANGUAGE sql IMMUTABLE
AS $_$SELECT box (public.create_point(0, $1), public.create_point($2,500000000))$_$;
It works now.
pg_restore (and pg_dump with plaintext format) set search_path to '' and this is reason why function was not found.
This was made to prevent security issue: https://wiki.postgresql.org/wiki/A_Guide_to_CVE-2018-1058:_Protect_Your_Search_Path
regards, Sergei