Strangely enough, I don't seem to have this issue. Using Office 365.
If I copy and paste your first "code formatted" JSON text section, and paste into Excel (select single cell, but not edit, hit CTRL+V) then in pastes it into a single column across 10 rows. The font changes to "Var(--ff-mono)". The spacing remains intact.

If I do the same, but edit the cell before pasting (i.e. select cell, double-click/press F2, CTRL+V), it pastes everything into a single cell. "Wrap text" comes on automatically, and the row height jumps up. After resize both the column width and the row height, it looks like this (font stays the default Calibri):

TL;DR
Paste your json data into notepad or possibly superuser first (to rid your data of all formatting, then select all and copy again, paste into Excel.
If that doesn't work, you could try reapplying / pre-applying (paste with destination formatting) either the calibri or your default font, or a monospace font like Courier New. Last resort, try Office 365.