The available moves a Pokémon can learn may differ between Pokémon Sword, Pokémon Shield, Pokémon Brilliant Diamond, Pokémon Shining Pearl, Pokémon Legends: Arceus, and also other Pokémon games.
For that reason, if a Pokémon is moved to a game title with an incompatible moveset via Pokémon HOME, that Pokémon's moveset will be temporarily replaced.
Your Pokémon's moveset is saved per game title, and so even if the moves change after being deposited into a title with incompatible moves, you are able to change it back to the original moveset by moving it back to the original software.
*However, note that if you move a Pokémon caught in Pokémon: Let's Go, Pikachu! or Pokémon: Let's Go, Eevee! to Pokémon Sword or Pokémon Shield, in this specific case the original moves will be retained.
*Please also note that in the specific case of a Pokémon caught in Pokémon: Let's Go, Pikachu! and Pokémon: Let's Go, Eevee! , if you move it to Pokémon Sword, Pokémon Shield, Pokémon Brilliant Diamond, Pokémon Shining Pearl or Pokémon Legends: Arceus, it cannot be moved back to the Pokémon: Let’s Go titles.