Let me speak only about Thai language and what rules govern the loanwords. Other languages may well "behave" the other way.
is it generally true that the "closest" tones will be borrowed as well as the "closest" phonemes?
Short answer: Yes, but not always for phonemes; Usually No for tones.
I would also say that it's useful to know how words borrowed from non-tonal languages (English) change. It would highlight the things better.
Many words are borrowed along with their pronunciation
[baː biː kʰiw] barbecue
[kʰʊŋ3 tsɨ3] -- ขงจื๊อ
[kʰǒŋ tɕɯ́ː] Confucius, a philosopher
...but sometimes not accurately. There are several observations:
However, more drastic changes happen when loanwords omit tone marks, so they have default tone governed by the initial consonant (1).
[ka ra o ke] คาราโอเกะ
[kʰaː raː oː kè], karaoke.
This word is a shining example: the original word has all syllables of equal length (has no lexical vowel length), while being borrowed, it has long vowel for syllables 1-3, but short vowel for syllable 4 (plus, short vowel produces Low tone according to Thai grammar rules).
[in tʰɤː nét] Internet.
Note that due to vowel length, it sounds rather like "inTERnet", plus the last syllable has High tone.
[kʊŋ1 sɨ1] -- กงสี
[koŋ sǐː] -- company.
[iː], different length, and different tones: High+High tones vs. Mid+Rising
All above applies per syllable, of course. If the word is polysyllabic, the same rules apply that govern polysyllabic words of Thai language (see Enepenthetic ‘Leading Consonant’ Clusters).
(1) In Thai language, syllable's tone is defined by its initial consonant, unless overridden by an explicit tone mark. Each consonant belongs to one of three consonant classes. Each consonant class is associated with a default tone, governed by live/dead syllable or long/short vowel.
So, the summary:
- Consonants are often preserved in their written form;
- And become governed by the target language rules;
- Vowels are more vulnerable for changes (than the consonants);
- Some loanwords attempt to keep original tone;
- Often, it happens to be not very accurate;
- A large number of words do not retain the original tones;
(A) Fundamental frequency contours of the four Mandarin Chinese tones (spoken by a female speaker of Mandarin). Each tone on the syllable
/ma/ represents a different lexical item. “ma1” is the level tone, “ma2” the rising tone, “ma3” the dipping tone, and “ma4” the falling tone.
(B) Fundamental frequency contours of the five Thai tones (spoken by a female speaker of Thai). Each tone on the syllable
/ma/ represents a different lexical item. “ma0” is the mid level tone, “ma1” the low level tone, “ma2” the falling tone, “ma3” the high level tone, and “ma4” the rising tone.
Image from here