No, it did not - that is nowhere stated in the friendship treaty
As to "Russia never accepted Crimea grab by Ukraine in 1954" -- that's a lie
The Russian Soviet Socialist accepted it -- the republic parliaments of both the Russian SFSR and the Ukrainian SSR had given their consent to the transfer of Crimea and so had complied with Article 18 of the Soviet Constitution which stated that "the territory of a Union Republic may not be altered without its consent.", with the proceedings of the USSR Supreme Soviet Presidium meeting indicate that both the Russian SFSR and the Ukrainian SSR had given their consent via their republic parliaments,
In 1954, the parliament of the Russian SFSR made an official petition to the parliament of the Soviet Union to transfer the Crimea Oblast to the Ukrainian SSR. The parliament of the Ukrainian SSR agreed to the transfer. On 26 April 1954, the Supreme Soviet (parliament) of the USSR issued a law on the transfer of the Crimean Region/Oblast from the Russian SFSR to the Ukrainian SSR
Here is the link to the Russian SFSR's official petition
then here is the 1990 agreement between Russia and Ukraine recognizing each other's territory
Furthermore, the very same 1997 "On Friendship, Cooperation and Partnership" Russia confirmed that is "respects the territorial integrity of Ukraine and confirms the inviolability of the borders existing between them" in article 2
So, Russia accepted the transfer and confirmed that acceptance twice after
In 1954, the parliament of the Russian SFSR made an official petition to the parliament of the Soviet Union to transfer the Crimea Oblast to the Ukrainian SSR. ==
It was a COMMIE grab. Soviets gave it to ukies. But Russians never accepted that. So I showed you the parliament of RUSSIA resolution of 1992 on Crimea.
Furthermore, the very same 1997 “On Friendship, Cooperation and Partnership” Russia confirmed that is “respects the territorial integrity of Ukraine and confirms the inviolability of the borders existing between them” in article 2==
Maybe but also it was confirmed the neutral status of Ukraine. But ukies violated this applying to NATO. NATO is a hostile military block to Russia. SO one thing can’t go with out another. If no neutrality then no territorial integrity.
And also ukies disbanded this treaty in first place. So no more border confirmations.
Again Ukraine may go to NATO but in border so 1654. If they wanna go then they must return any Russian territorial gifts.