If the pre-install or post-install script for a package fails, pkg register ignores the failure. pkg add dies as I would expect.
Looking in like libpkg/pkg_ports:pkg_add_port(), indeed the functions that are invoked to run the scripts (e.g., pkg_lua_script_run, pkg_script_run) do ignore the return code, whereas libpkg/pkg_add.c:pkg_add_common() checks the script return code.
See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206951