The lossy compression on phone calls might prevent fax from working. Also, I don't know if you can route call audio from anywhere other than the microphone.
HQ audio quality (over 4G) is markedly better than land lines, and the fax protocol has had error correction since digital formats were adopted in the 60s and 70s.
Sampling frequency 8 kHz/13-bit (160 samples for 20 ms frames), filtered to 200–3400 Hz.
The AMR codec uses eight source codecs with bit-rates of 12.2, 10.2, 7.95, 7.40, 6.70, 5.90, 5.15 and 4.75 kbit/s.
Fax machines on the other hand go up to 33kbit/s.
PS: People can produce and hear frequencies well above 3400 Hz, but for phone calls people just don’t notice clipping those frequencies. If anything it helps by removing some background sounds.
Fax has an ip protocol called t.38 however it is inconsistently implemented. Most services still rely on g.711 - essentially uncompressed voice - for transmission of fax tones. However there is no guarantee the end to end call will be g.711 even if specified during call setup. There is an app called eFax - unfortunately the service is not free but I as a subscriber routinely fax over the phone when it’s the only way to communicate (like with a doc office).
While G.711 is uncompressed (it’s the same codec used within the PTSN backhauls), it’s still not great for fax because the fax protocol doesn’t tolerate the jitter introduced by VoIP. (Reliable latency is the one big benefit to switched networks like the PTSN.)
As I understand it (and I could be wrong), T.38 solves this by emulating an independent fax modem on each side of the analog connection, and only sending the image data over IP as opposed to sending audio.
You’re right g.711 is not ideal either. Jitter is a killer. T.38 is a solution when it’s supported on both sides and it is often not. The best solution is email but apparently every title office and pediatrician in the land cannot be bothered! ;)
Although thankfully many have moved on.
As a reference point, if you have a cellphone plan with minutes but no data plan, it's not really feasible to dial a 56k-modem endpoint, as it makes use of frequencies that are chopped by the voice codec.
... Wait, why? Standard landlines are 300hz to 3.4khz; pretty low-fi. They should not be particularly hard to beat. VoLTE certainly sounds better than them.
Your network or device may still be using the 90s cellular voice standard, tho.