NPCs make move selections based on the situation they observe at the beginning of the turn. So if you have a Protean Greninja and it's turn 1 (so Greninja is Water/Dark, without having the opportunity to make a move yet), they will look at their moves and decide which one is best worth using against that type combination, even though Greninja may well go first and change to a different type before their move gets to hit. They can't try to anticipate reading your input and adjusting their decision making on the fly based on that--instead, that reaction is going to be pushed back a turn. On turn 2, they'll get to see what type Greninja is after its turn 1 move, and choose their next move based on that type, but again there's no guarantee the type they were planning for is the type your Greninja will actually be when they get to take their turn.
Protean from an offensive standpoint, when they're the one that has the ability, can be interesting too. While they of course get credit for the ability when the move is actually being used, they don't take it into account during move selection. In basically all scenarios in these games where an opposing trainer might reasonably have a Pokemon with one of these abilities (the Game Freak double battle, Battle Maison, Battle Tree), it's a late-game battle against an opponent who uses "smart" trainer AI. What "smart" in this context means is that they do their due diligence with damage calculations, reading off your exact stats and assuming the pessimistic view of a minimum random roll, letting those details shape their decision-making. In particular, if that minimum roll appears to be a guaranteed KO against your current health bar, they go into what's effectively a bloodthirsty trance and have an extremely low chance (less than 5%) of picking any move that does not secure that KO. However, even a Protean opponent performs this tentative calculation using their current type. This means there may well be a move that would be a KO when it comes time to do the actual damage calculation and apply STAB, but when they're checking the numbers before committing to their action, they don't see STAB and therefore don't see enough damage, and may well be prone to picking something else. Specifically, if they just used a move last turn to become that type, they do see the benefit of STAB on that move, effectively giving it a leg up on everything else during the tentative damage calculation step, and creating a bias toward switching their own type less often, even as that comes at the expense of trickery.