If there’s logic that depends on the reason phrase, then it wasn’t doing HTTP correctly. It’s not meant to be used that way. See the HTTP/1.1 spec:
https://www.rfc-editor.org/rfc/rfc7230#section-3.1.2
The reason-phrase element exists for the sole purpose of providing a
textual description associated with the numeric status code, mostly
out of deference to earlier Internet application protocols that were
more frequently used with interactive text clients. A client SHOULD
ignore the reason-phrase content.