The workaround I've come to rely on is the Copy/Paste Format feature shortcut. As the format "clipboard" is separate from the text clipboard, it is preserved for as long as you have the document open.
find a section you have formatted as "code", e.g. Consolas 9pt.
Use option + command + c or Ctrl + Alt + c or use the Paint Format icon
The following isn't an answer to your question per se, but it is an exploration of the syntax surrounding TextStyle and RichTextValue. It may assist in understanding why var x = A1.getRuns(); doesn't work, and how you might build code to analyse cells. Note the programmatic creation of RichText is another thing altogether.
Yes, the equations feature in Google Docs is half-baked. You have two ways to address this:
Firstly, leave feedback for the developers so that they know that people don't like how this feature works. You can do that by clicking on the ? icon on the top right of drive.google.com, then clicking "Send feedback". Alternatively, in the mobile app, tap the menu, ...
GitHub uses Markdown (specifically a custom 'flavour' thereof), and in Markdown you can escape backticks in code by using double backticks: https://github.com/mattcone/markdown-guide/blob/master/_basic-syntax/code.md#escaping-backticks
If the word or phrase you want to denote as code includes one or more backticks, you can escape it by enclosing the word ...
Gmail still preserves rich text formatting (For example from VS Code) but doesn't like MS Word.
One solution is to copy from Google Docs (either format your email there, or open an MS Word doc in Google Docs).
Yes, formatting is still weird in 2019.
Right now you can fully hide the line with font size 1 and custom line spacing .06, I visually verified that saving as PDF shows no whitespace at the top.
Also, in regards to not being able to insert text before the table, it is possible to get back to the invisible line using the left arrow key while inside the table.