Have uncompressed keys always used the 04 prefix, even before compressed keys (which use 02, 03) were used?
Yes.
Did bitcoin undergo an update to add these prefixes to the different key types?
Bitcoin wallet software did undergo an update to make use of these compressed keys. There was no change to the consensus rules/implementation needed, because (at the time) OpenSSL accepted both compressed and uncompressed public keys. In fact, there is a third type that was (and still is!) supporter, hybrid keys, which use prefix 06
or 07
(depending on even/odd T coordinate), followed by 32-byte X, and 32-byte Y coordinate. I do not understand the motivation for having such a type, but it is part of the implemented specification.
If so, since these prefixes are included in the hash used to produce addresses, did addresses using uncompressed keys “change” when compressed keys were introduced?
Yes. But ony the receiver cares about the distinction, as the sender only sees the 160-bit public key hash. At spend time, the receiver needs to reveal the full public key, whose hash needs to match the public key hash sent to.
If you have an extreme old Bitcoin Core wallet.dat file that has never been updated, and load it into a very modern Bitcoin Core 27.0 software, it will still produce P2PKH addresses using the uncompressed public key, so that one can still go back to old versions. This will not keep working however, as legacy wallet support is scheduled to be removed from Bitcoin Core. Such old files will still be usable, but will need to be converted to a modern format first.
Also note that since the introduction of compressed public keys, there have been actual new address types (with corresponding consensus changes): P2SH, segwit, and taproot.