From what I see on Wikipedia, Sublime Text is a text editor, meaning it handles plain text files without formatting instructions (fortunately for the compilers).
What you see in the editor screen is some courtesy decoration to help you write your code. This decoration is not intended to be exported. When you copy something, the editor puts only text into the clipboard. This means LO Writer will have only unformatted text.
You can decorate the code in Writer the same as in Sublime Text. But this will cost you a few character styles.
Globally, the code will be assigned built-in paragraph style Preformatted Text which will likely need to be customised for your preferred font, size, indents, … You create a few character styles like Keyword (for
function, …), String, Variable, Function, … You give these character styles the same colour as Sublime Text. Double-click on a word and assign the character style.