Joseph spoke in the language what the local spoke at the time, i.e., Egyptian language.
Genesis 39:23 The warden paid no attention to anything under Joseph's care, because the LORD was with Joseph and gave him success in whatever he did.
Joseph was a teenager when he arrived in Egypt. His brain was still adaptable to a new language naturally.
He was a slave and had to talkd to fellow slaves in Egypt for some years before Potiphar put him in charge of his household.
Genesis 39:6
So Potiphar left everything he had in Joseph's care; with Joseph in charge, he did not concern himself with anything except the food he ate.
Now, he had to learn to vocabulary to talk to an upper class of people, even to Pharaoh later on.
Genesis 41:41 So Pharaoh said to Joseph, “I hereby put you in charge of the whole land of Egypt.”
I doubt that Pharaoh would put Joseph at such a high position if Joseph did not speak perfect Egyptian, that he sounded like a foreigner.
42Then Pharaoh took his signet ring from his finger and put it on Joseph’s finger. He dressed him in robes of fine linen and put a gold chain around his neck. 43He had him ride in a chariot as his second-in-command, and people shouted before him, “Make way c !” Thus he put him in charge of the whole land of Egypt.
44Then Pharaoh said to Joseph, “I am Pharaoh, but without your word no one will lift hand or foot in all Egypt.” 45Pharaoh gave Joseph the name Zaphenath-Paneah and gave him Asenath daughter of Potiphera, priest of On, to be his wife. And Joseph went throughout the land of Egypt.
If he didn't speak perfect Egyptian, I doubt he could command the respect of the Pharaoh and local officials.
His Egyptian name Zaphenath-Paneah means 'the god speaks and he lives'
Would you think that the Egyptian god speaks with a foreign tongue?
Joseph was a smart guy and quick to learn and the LORD was with Joseph and gave him success in whatever he did, including picking up the local language.