I do understand that they can be interchangeable, but can you provide me some example to understand the difference?
まま- helpful link
っぱなし- helpful link
basically まま is used when we keep something "as it is" and っぱなし is used to when we keep something in "use"
まま and っぱなし have similar meanings but っぱなし, when used with a transitive verb implies that the action or state in question is judged as "improper" (e.g., not socially appropriate, goes against one's common sense) and is seen as something "negative". まま does not carry that negative connotation.
Aside from this, there are certain verbs that only work with either まま or っぱなし but not both.
See p. 335 of A Dictionary of Intermediate Japanese Grammar.