Did the constitution say that states splitting off from the USA was forbidden?
Yes. The Constitution and the laws and treaties made under it are the supreme law of the land. But there would be no supreme law of the land, i.e., the nation-state of the United States of America, if any of the land’s constituent parts could put themselves beyond the jurisdiction of that law by seceding from the land.
Also, according to the Constitution the debts and obligations incumbent on the United States under the Articles of Confederation remained in force under the Constitution. Each of the original 13 states had ratified the Articles of Confederation and perpetual union before they each ratified the Constitution. Thus each state is obligated to maintain its perpetual union with the United States.
Furthermore, it is a myth that each state entered the Union with an opt-out option. The law governing the admission of new states from the Old Northwest Territory, that was enacted by the Confederation Congress before the Constitution was ratified, had a provision that any state that entered the Union had to remain a perpetual part of the Union. (Since the Republic of Texas ceded some of its territory to the federal government upon its admission to the Union, Texas was given the option of dividing itself into as many as 5 separate U.S. states.)
These issues were clarified by the Supreme Court decision in
Texas v. Miller and the legal action that Custis Lee took in federal court to reclaim his family’s property that the federal government had seized during the rebellion, i.e., Arlington National Cemetery. If Virginia had legitimately left the Union, then Arlington would have been conquered foreign territory, but federal courts ruled that Virginia had remained part of the Union so the Lee family was owed compensation because their private property had been taken for public use. The Federal government returned Arlington National Cemetery to the Lee family who then sold it to the federal government.