I also struggled with this but think I may have found something that can work (at least temporarily!), which is to use an invisible character instead of a space. I copied and pasted this symbol everywhere I wanted a space in my listings : (ㅤ)
Not super technical but hopefully may help some people!