Thanks for reaching out on Microsoft Q&A!
Have you tried wrapping your variable in the binary() function, like this:
binary(variables('text'))
Logic Apps assumes all content is UTF-8, however your SFTP-server may not accept UTF-8 characters to be posted in the body. With the binary() function it will wrap your UTF-8 content in a byte array, which may solve your issue.
When you think my answer is helpful, please click "Accept answer" and upvote it. Feel free to drop additional queries in the comments.