How to keep an em dash within the same line as the word it's touching?

Greetings people, Krillin here,
sorry for the silly question, but I’ve been struggling for days trying to find the setting and/or documentation regarding this feature. According to another post I found here, I think it happens because it’s a grammatical rule in the English language (I speak Spanish, however; haven’t had any luck finding sources that talk about these rules in any of the languages yet. Modern Google is driving me crazy).

I’d like to know if it’s possible to keep it on the same line whenever the word is too long to fit in, as shown here:

From this:
image

To this:
image

(Doing it manually, by inserting Shift-Enters, leads to problems when formatting it for eBooks/Kindles. Their widths vary)

“se escriben pegadas a la primera y a la última palabra del periodo que enmarcan” (https://www.rae.es/dpd/raya)
By what I understand, it behaves the same that a parentheses.
But, following the rules, you must add an em dash after Rödjínbur.

Tysm, it fixed it!

For anyone who might want to know: Used the “Word Joiner” option right between the em dash and the first letter. Planning to use a regex to replace all the dialogues like this in two clicks, or find a way to make it a default/automatic format style, I will see.