Who will care if you don't get an interview? If you'd be sad and they wouldn't, then that's the reason you lose the negotiation. Not because you mentioned a number first, but because you need them more than they need you.
If your relationship to the company was symmetrical, then when they say "how much are you currently paid?", you could ask questions like, "how much did you pay the guy I'm replacing in this role?" or "how much on average do you hire people for at this level in the organisation?"
They won't tell you those things. You don't have to tell them your current salary, but they might not interview you if you don't. So you just have to decide what's most likely to get you a job you want. If you think the prospective employer will, with tiresome predictability, make you an offer that's a tiny bit over your current salary and not worth moving for, then you know you're going to turn them down eventually so get it over with now and let them not interview you. Apply instead to employers who don't demand this information.
Ultimately if they stick to their guns, you either have to agree to their terms or give up. And if you stick to your guns, they either have to agree to your terms or give up.
What you put in those boxes will anchor their offer. But it's not certain whether that's a win for you or a loss. The big fear is that because your current salary is low, mentioning it anchors them low. And your current salary is fairly likely to be low or low-ish: you are after all looking for a new job.
Suppose you say you currently make $40k, you tell them this and you tell them you expect $80k. You secretly know your real bottom-dollar: that you will not (for whatever reason) move for less than $60k. Then either they offer you $60-80k or else they don't get you. Let's say they anchor on the $40k, offer you $50k, and demand to know why you love your current job so much. Maybe you end up walking away from a bad offer, but you haven't "lost". It might have been better all around if they hadn't forced you to reveal the $40k, because then you could both have agreed $60k, but that wasn't possible by their choice.
The second fear is that your expected salary is too low. Let's say they'd be willing to pay $100k and you say you expect $80k, you're very unlikely to get more than $80k out of them. It's actually absurd of them to treat your expectations, before you know more about the job, as an offer, but some will anyway.
The final fear is that your expected salary is too high and they figure you're not worth interviewing, and not even worth telling that they'd love to interview you if your expectations were lower.
To avoid those problems the ideal number to say for your expected salary, is right about the maximum they're willing to pay for the role or a little higher. So if you know the market fairly well there's no loss in saying a number first, because the number you say is the right number. The danger is saying the wrong number. So you can either play their game, make it past interview to the real negotiation, and ask for a salary you're happy with. Or you can call them out, refuse to answer, and see whether they're bluffing. It's just a matter of how much you need them.
Finally, if you consider it a game-theoretical fact that whoever mentions a number first in any negotiation is the loser, then consider whether used car salesmen therefore "always lose" because there's a price displayed on every car on the lot. And if used car salesmen always lose at negotiation, does that mean used car buyers always win at negotiation? So why do car salesmen keep doing it? You're not selling used cars, but you are selling something, so any argument that claims you shouldn't say a number first is pure baloney unless it specifically and convincingly explains what the significant difference is between you and a used car salesman. If the difference is about knowing the market value, then what that says is playing games with boxes on forms is only the second most valuable thing you can do. The most valuable is to find out your market value and demand it.