Same result…
If I manually press enter to send the LF in simulation (meaning using monitor in PIO), instead of using the LF char, it works… but the program I am working with is being sent a string in the format shown in screenshot (minus the additional \). So, when I attempt to send the string in their format (in simulation, again) this extra escape char is being added.
This is really weird, if tempUserInput just comes from e.g. Serial.readString(); then it should have all the original characters, and pressing enter in the device monitor should send an actual 0x0a (=‘\n’) character, not backslash followed by ASCII n.