Have you tried plugging in an external keyboard and see if those same keys dont work? Im curious if it just related to the onboard keyboard.
Is it the same exact keys that don't work each time, or do they switch? Is it the same keys that didn't work before the keyboard replacement that do not work now?
Speaking from experience, I have had some parts of a keyboard cease to function but start working again after replacing the keyboard and also managing the keyboard ribbon cable better. Sometimes the keyboard ribbon cable gets bent or kinked and that will stop some keys from working properly. Just guessing, but if different keys aren't working after you replaced the keyboard then its something to do with that ribbon cable, the connection point to the motherboard, or the keyboard. If its the same keys, then its probably a deeper seated hardware issue. Maybe try using a can of compressed air to clean out the pinch bar where the keyboard ribbon cable connects to the motherboard. Believe it or not, I've had "new" boards sent to me that were defective. This has happened from both the factory and from third party sellers on ebay (rare keyboard, no choice on where to buy.)