They shouldn’t be asking for it by my understanding. What they may do, and I’ve had them do in the past, is ask me to sign my AppleID out of iCloud so activation lock is off. That way if they need to reinstall iOS as part of the process of fixing it, they can do so and check function after the screen and/or battery replacement.
After the repair, you’d restore your iCloud or iTunes backup and sign back into your iCloud to set up data sync and find my and activation lock.
But no Apple employee should be asking for your AppleID password. They would ask you to sign a device out of iCloud as needed, but you would actually do it and not give them the information to do it themselves.
If an Apple store employee asked your for it, point them to Apple’s own policy statement and then ask to speak to a supervisor.
See -> Security and your Apple ID - Apple Support (my bold added to quote)
“Never provide your password, security questions, verification codes, recovery key, or any other account security details to anyone else. Apple will never ask you for this information.”