She "was" a Moabite woman because she lived in the Israelite territory of Moab.....not the Kingdom of Moab. There were no genetic Moabite people left here. The King of the Amorites saw to that and then Moses took "The Plains of Moab" away from him. This was part of Israel for over 700 years and it was still called Moab.
Matthew does not include that adjective "prostitute" beside Rachab's name because after the fall of Jericho, she was no longer a prostitute, and she was certainly not a prostitute after Salmon took her for his wife, and most certainly not after the birth of her son.
The reason for this is very simple. Matthew is not referring to the prostitute....James and Paul are! Rachab was not Rahab.
Would you say that Baoz is the same person as Booz?