How to disable pretty-print in Safari inspector?
You cannot disable it. Because the inspector is showing computed DOMs of rendered HTML (with JavaScript and CSS), it is a different thing from original HTML source code (but sometimes looked like the same one). So it is not just pretty-printed.

If you would like to get source code of the web page, see instructions below.

https://ccm.net/faq/33026-safari-view-the-source-code-of-a-webpage