Max File Size allowed exceeded (413 Error)

When there is a relatively large doctype and trying to save the record, on frontend system throws error Max File Size allowed exceeded. But in Network tab of Developer tools, it shows 413 error. So initially tried with higher file size in System Setting. But whatever value I set, it gives error with this value. So even if I set 100 Mb, 200 Mb, it gives error with this value.

I tried setting this in site_config.json, but this also gives same error.

Third option I tried by changing nginx config by setting higher client_max_body_size. I tried with 50, 75,100,200,500 MB. But the system still gives error for file size set in System Setting or site config.

I am getting same error when I added some 20 fields in Standard Doctype through customize Doctype. When clicked on Update button on Customize form, it gives error Max File Size allowed exceeded.

I checked the content length being sent through frontend. It is not more than 1 Mb (As reported in Network Tab). I even checked size of utf encoded data which is also not more than 1 Mb. Below is the header of one such post request.

POST /api/method/frappe.desk.form.save.savedocs HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: en-IN,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,mr;q=0.6,hi;q=0.5
Connection: keep-alive
Content-Length: 557424

Can someone please help with this? Because everything is stuck at the moment. I also checked for the solution on other platform. But everything leads up to client_max_body_size in nginx conf. is it something related to frappe?
Any help would be highly appreciated.

I checked all logs including web logs, nginx logs but nowhere 413 error is logged. So basically request is not reaching at nginx layer because on Dev tool it shows error generated from request.js code. Even for content length of 171 bytes system is throwing error. Is it a werkzeug error? If there is ready solution available, it would be really helpful.