I've always asked, and then get the generic "for the ideal candidate we are prepared to go very high", which I tactfully point out as the BS it is - there is no role that has ever been advertised without a manager or director-level sign-off on the range.
I usually reply to the brush-off with "I only ask because the seniority level is reflected in the salary, not the role or the advertisement."
I say that because it is, in fact, true: the seniority/skill required for the role and duties/responsibilities dictates the pay, the bullet points in the advertisement and the role description is often completely divorced from the level of seniority or skill required in the actual role.
IOW "We're hiring a Senior dev" might have me respond "That's a Junior pay-bracket".
I’m not sure of a way around this. I’ve done it.
I need someone to do a specific set of tasks, but there’s also a wider group of tasks which I’d like someone to do, but it isn’t urgent.
The posting goes out for the task we NEED. If someone more senior applies, and they can do more than the role needs, we pay them more.