It may sound impossible for a country to move from one continent to another, but it did happen once, at least on maps.
In 1821, when the Central American country of Colombia won its independence from Spain, the country we now call Panama was part of Colombia. Since Colombia is in South America, Panama was then said to be part of South America.
But in 1903, Panama won its independence from Colombia. It became a nation in Central America. Since Central America is considered part of North America, Panama had moved from the continent of South America to the continent of North America!