Not so.
The deepest part of Thai waters is around 190 metres.
The Yuan class submarine has these details
https://en.wikipedia.org/wiki/Type_039A_submarine
Structure: double hulled
Length: 66 meter
Beam: 8 meter
Draft: 8.2 meter
Surface displacement: 1,850 tons
Submerged displacement: 2,300 tons
Maximum speed: 18 knots
Cruise speed: 16 knots
Range: 8000 nautical miles at 16 knots
Endurance: 60 days
Crew: 38 total
Maximum depth: 300 meters
The draft of 8.2 metres means the normal depth of water from the keel to the waterline. Even if you add another 12 metres to it to get to periscope depth, it is still only 20 metres in height.
That means that if it is on the seabed there is still 150 metres of water above it at the deepest point of the Gulf of Thailand.