Can malware skip the administrator password popup if it already knows the password on macOS
Yes, specifically, if malware can pop that up, you may already “be toast” so it won’t need to do this since it could just install a key logger and not tip you off.
If you want to learn more about keyloggers or other behaviors that are more solid indications of keylogger, try ReiKey by Objective-See is excellent.
LuLu and KnockKnock are excellent as well as general tools in this (malware and PUP) space:

https://objective-see.com/products/lulu.html
https://objective-see.com/products/knockknock.html


When you are prompted for the password, normally that’s the OS asking for your password and very low chance that your password is about to be compromised. Malware could be about to run, but it’s not likely and not likely about to capture your password. The program asking for the password doesn’t get your password, just temporary admin rights.
What it does with those rights is the worrisome part, malware or not. It could install a key logger or persistent processes - those are worrisome.
Worst case, some malware could craft a dialog like your password and fool you to escalate privileges, but this is an unlikely possible scenario.
Anything is possible, especially if you are a high value target. For most people, tricking you or just running something that’s not signed is the risk here - not losing control of a strong and unique admin password.