Should pronunciation of the r in "heart" be the same as r in "rabbit", in UK English?
There is no /r/ sound in ‘heart’. It is pronounced /hɑːt/.
In Received Pronunciation, Standard* British English and most New Zealand accents, /r/ is only pronounced when it precedes a vowel sound, so the “r” in “heart” is not pronounced. But in Standard* American English and in many UK regional accents the /r/ is pronounced. That’s why we include it in the spelling.
When the /r/ is pronounced it is known as a rhotic r, and accents that include it are called rhotic accents. Standard* British English has a non-rhotic accent.
This is a slight over-simplification. For all the gory details, consult the standard repository of all knowledge.
*By “standard” I mean the kind that is taught to non-native speakers.
Notice that when pronouncing, rabbit, barrow or ruler the lips are pushed outward forming a small "oh" shape, while when pronouncing heart the lips to do not move like while the tongue is pushed up against the inside face (lingual) of the upper teeth. Try pronouncing heart with the lips out forming an "oh" and see if that feels natural-- it doesn't. They are both 'r' sounds but not the same 'r' sounds.