The Cambridge Dictionary defines rape as:
to force someone to have sex when they are unwilling, using violence or threatening behaviour
In this regard the prescription of the currently available Manusmriti, 8.364
is very clear i.e. death penalty:
योऽकामां दूषयेत् कन्यां स सद्यो वधमर्हति।
सकामां दूषयंस्तुल्यो न वधं प्राप्नुयान्नरः॥३६४॥
If a man violates an unwilling maiden, he deserves immediate death; but if he, of equal status, violates a willing one, he shall not suffer death. [the punishments for which are explained later, such as finger clipping]
Though nothing is mentioned here, it maybe assumed from Manusmriti 8.380, that a Brahmin won’t be accorded death penalty (also see below)
One may contend that the above case is restricted to an unmarried person. Therefore I’d like to state that if one does the same with a married woman (adultery), then, as per the Manusmriti, the punishment is same as above, i.e. death in the case of the other 3 castes and tonsure for a Brahmin.
In a case of adultery, a non-Brāhmaṇa deserves the penalty ending in death; as the wives of all the four castes are always the most deserving of protection.— (8.359)
Tonsure has been prescribed as the death-penalty for the Brāhmaṇa; for other castes the penalty would be actual death.—(8.379)
I would also like to add the perspective of the woman with whom something heinous has been committed. With respect to this, the Atri Smriti 194-195 says:
In the case of a woman who’s completely unwilling, if a man has approaches such a woman by prowess, deceit, such a violated woman must not be abandoned because it was not her will. It is okay to unite with her after her seasonal flow, the reason being that she is purified after her flow.
I have discussed about the punishment in the case of adultery here. I have tried to provide an explanation for some contradictory verses of the present Manusmriti, which first go as per the general rule (death for 3 castes), then bring differentiation in castes (only death while defiling a Brahmin) into the picture and then again go back to the general rule (death for 3 castes except Brahmin). The discussion being specifically centred around punishment for Shudras, I have tried to stress on the Pratiloma aspect to specially answer the question, included quotes from scriptures to stress on that aspect only, and included only the word ‘Pratiloma’ for the general rule, in the conclusion. Yet Manu 8.359 is very clear : death for all the other 3 castes and tonsure for Brahmin, irrespective of Pratiloma union and the same can be evidenced from Medhatithi’s Manubhashya which explains why the penalty for adultery with the Brahmin woman and Shudra woman are same.