Reading the spec, that's definitely not what 204 is meant for.
https://httpwg.org/specs/rfc7231.html#rfc.section.6.3.5
> The 204 (No Content) status code indicates that the server has successfully fulfilled the request and that there is no additional content to send in the response payload body.
I don't see how that could be intepreted to mean "You have requested a resource which does not exist". It's intended for use cases like "Your request to save the file has been received, no further content will be sent".
Or am I misreading the spec?