Applying a set of styles both with a media query and with nested rules
You usage of the mixin will work and although it is not pretty there is not much else that can be done as far as valid LESS / CSS output.

I've written up an example of complex mixins like below.
LESS lazy mixin for element width/height/float

As well as one that might be on track with what you are trying to accomplish.
https://stackoverflow.com/questions/39338429/less-outputs-extra-semicolon

Keep in mind that this using a JavaScript array in a hacky type mannor and the output would still need to be sanitized of the extrenious code that is not valid. But I think we are both headed in the same direction.