I found a solution for this issue, and you can simply end your entrypoint script with the following:
exec /opt/startup/start_nonappservice.sh
This will start the Azure Function as normal after everything else.