I am using postgres database running within docker v13.3 (latest). I have found an issue where jsonb and timestamp type returned from function saved in the db assumes extra quotes and thus break json format.
You are printing a tuple which has a json column. The tuple has its own escaping/quoting rules as does json. You are seeing the combination of both.
You cannot do anything with the json value unless you first extract it from the tuple so while I get the confusion about the visual and you experiencing any actual issues because of this?