The spaces *after* the newlines (i.e. the indentation) put the pretty in the printing. The spaces between the comma and the newline are superfluous.
Compare with Clojure:
λ clj -M -r
Clojure 1.11.1
user=> (require '[clojure.pprint :refer [pprint *print-right-margin*]])
nil
user=> (prn (with-out-str (binding [*print-right-margin* 20] (pprint {:a 1 :b 2 :c 3 :d 4}))))
"{:a 1,\n :b 2,\n :c 3,\n :d 4}\n"
nil