What is the difference?
Only one: залиши́тися is a standard dictionary form for the infinitive. So, if you search the word in a dictionary then choose only with -ти(ся) like this.
Is it a local dialect variation?
If you're speaking about things such tests and exams, then there is a standard orthography:
§ 115. Indicative
Rule #9. […]
Note #3: Itʼs always a postfix -ся. But in talking, or writing style you can also use -сь. But if itʼs past time for masculine then -сь can be only after в: усміхну́всь (but стері́гся).
§ 118. Infinitive
Infinitives end with -ти: […].
Note #1: In talking, or writing style you can also use -ть if a base (a part before -ти) of a word ends with vowel: […].
But itʼs kinda yes, because some dialects prefer -ти, and others prefer -ть. The standard language is a mix of dialects; therefore you can use what you prefer. But of course, a dictionary form is the most popular.
If speak about dialects then you can also notice many things, for example some of them:
- for he/she/it removing -ть: [він] залише(ся), or adding -ть: несеть instead current standard несе,
- ся can be separated from verb: ся залишити;
- ся can be writed also as си;
- ть can be writed also as just -т: залишит.
Whatʼs going on with that?
Well… itʼs not so simple but letʼs try.
In some cases itʼs mixing between supin and infinitive.
But mostly itʼs just phonology where:
- removing a vowel but saving palatalizing for consonant: ся − а → сь [я = ьа], ти − и → ть (historicaly и = ьi here) etc; for note, it happens in imperative too: крадь or кради;
- in some cases removing palatalizing: ть → т;
- in some cases и [read ьi] becoming as today и.
Another note
By a rule of orthoepy a part тьсь like in ться is read as long ць, therefore залишиться is залишицця by pronounce.