YJ-12 has a range of 250-400 KM depending up altitude. Brahmos has a range of 450 KM - 500 KM and it flies much lower than YJ-12.
BTW, Pakistan does not have YJ-12. It has CM-400AKG ALCM variant, which has a range of 240 KM max. Also CM-400AKG ALCM flies much higher than Brahmos-A. There is a reason why CM-400AKG has a mass of 900 odd KG while Brahmos-A has a mass of 2500 KG. Flight profiles. Flying lower takes more thrust and so more fuel but offers better hiding from detection. Brahmos-A, has a range of 400 KM +.
Lastly, Pakistan does not field ground launched or ship launched or sub launched versions of YJ-12. Only Air launched versions. India has ground, ship and air launched versions of Brahmos with sub launched version in works.
The range of the YJ-12 is clearly stated by experts at 400km, the "depends on altitude" part you got from wikipedia.
Here, from none other than missile defence advocacy alliance;
The YJ-12 has a range of 400 km, can reach speeds of up to Mach 3, and is capable of
performing air-borne evasive maneuvers before hitting its target.
The YJ-12 poses a number of a number of security concerns for U.S. naval forces in the Pacific and is considered the “most dangerous anti-ship missile China has produced thus far.” [2] The danger posed by the
YJ-12 comes from its range of 400 km, making it the
longest-ranged ACBM ever engineered
missiledefenseadvocacy.org
Pakistan does have the lighter version of CM-400AKG. The range you stated is what is known as the "on paper profile", actual range and what has been given to Pakistan is highly classified, as with many systems given to Pakistan by China they tend to be significantly far better than what other countries can expect to buy with off shelf purchases.
True the CM-4000 doesn't fly low, here the reference from Stephen Trimble;
A list of system features appears to confirm an unusual characteristic associated with the CM-400. Unlike most high-speed cruise missiles, which fly at low altitude to avoid detection,
the CM-400 uses “high [altitude] launching” to achieve “higher aircraft survivability”, according to the video.
China's AVIC has revealed performance and accuracy details about a supersonic cruise missile reportedly dubbed an "aircraft carrier killer".
www.flightglobal.com
The
CM-400AKG, a product of the Aviation Industry Corporation of China, is an unusual weapon. Unlike many other anti-ship missiles,
it follows a high ballistic flight path.
And David Axe;
According to the manufacturers’ figures, a fighter such as a JF-17 would launch the CM-400AKG at an altitude between 26,200 and 39,400 feet while traveling as fast as Mach .9.
The weapon’s
apparent origin as a development of the SY-400 short-range ballistic missile could explain this odd profile. The CM-400AKG like other high-flying ballistic missiles consumes solid fuel and does not require an air inlet. Lower-flying weapons often combine liquid fuel and an air-breathing motor.
But this the idea i.e. it makes it very difficult to intercept....
You also ignored the fact the lighter CM-400 is a far faster missile than Brahmos, with some experts putting it at Mach 5.
Also finally a ship launched variation will be arriving with Pakistan's new Typ54A frigates.
Pakistan Navy's 054A/P frigate is likely to be equipped with SR2410C phased array radar and the export version YJ-12 supersonic AShM CM302. CGI by 西葛西
Type 54A Pakistan Navy's 054A/P frigate is likely to be equipped with SR2410C phased array radar and the export v...
thaimilitaryandasianregion.blogspot.com
Your own media has even reported it;
Moreover, according to some media reports, Pakistan’s variants despite subsonic C-802 could be fitted with
the latest CM-302 supersonic ASCM, an export version of PLA-Navy YJ-12B, offered by China’s CASIC.
Photo: Pakistan Navy’s Type 054A frigate. By Atul Kumar A strong navy packed with aircraft carriers, surface combatants and underwater submarines is indispensable for safeguarding the vital s…
defence.capital
An export variant of the YJ-12 missile, the CM-302, is likely to be the primary weapon on board four new Chinese frigates being built for the Pakistan Navy at the Hudong-Zhonghua shipyard in Shanghai.
A game-changing Chinese anti-ship missile, capable of flying at three times the speed of sound, could erode a key missile advantage the Indian Navy has enjoyed over the Pakistani Navy since 2005. An export variant of the YJ-12 missile, the CM-302, is likely to be the primary weapon on board four...
www.ndtv.com