Unfortunately "success" in Functions is whether or not is successfully pushed something to the output binding for any type of output- it doesn't have a special case for HTTP error codes.
Using `ILogger.LogError() won't show up on the graph, but you can still alert on it by creating a log alert on the requests table. Your 500 response should show up as success == "false" in the requests table in App Insights, even if Functions successfully completed its task. This is likely your best option if you would like to send a custom 500 response.
requests
| where success == "False"
There is a similar question on Stack Overflow with more info: https://stackoverflow.com/questions/51646904/is-this-application-insight-azure-functions-bug-or-my-understanding-is-incorr?rq=1