Looks like your render hook adds an extra newline due to having a newline at end of file.
See this for example this topics:
As suggested either save the file without a trailing newline or use the proposed trick , by adding this code to the end of your render hook:
{{- /* trim whitspace */ -}}