You know sometimes when we talk with people, sometimes they ask us “what are you doing?”

And you answer “Wallah ma ba3ref” but in fact you’d be doing something but just don’t want to say it for example.

Does it count as swearing by Allah while lying?

If one has to, one can do what is called Tawriyah. Basically when someone asks you what you will be doing, you say “ma ba3rf” with this intention: I don’t know exactly what will happen in the future, only Allah knows that. This would be ok since you are not technically lying.