Declaring the decimal variables as DECIMAL(35,20) gives the correct result.
But declaring the decimal variables as DECIMAL(35,19) gives the rounded result.
It looks like BOL is wrong in Precision, Scale, and Length (Transact-SQL).
From the testing I can do at work, the formulas make more sense if p is the integer precision rather than the total precision.
So the code in the question has integer precision of 18 (38 - 20) so SQL wants the result to have integer precision of 37, which only leaves one place to the right of the decimal point so the "at least 6 to the right rule kicks in.
Multiplying two DECIMAL(35,20)s which have integer precision of 15 requires integer precision of 31 (15+15+1) which leaves 7 digits to the right of the decimal point.
While DECIMAL(35,19) has integer precision of 16 and the product would need 33, again triggering truncation.
The actual moral of the story is to only use the integer precision you will need.