I do understand that they can be interchangeable, but can you provide me some example to understand the difference?
2 Answers
まま- helpful link
http://japanesetest4you.com/flashcard/learn-jlpt-n3-grammar-%E3%81%BE%E3%81%BE-mama/
っぱなし- helpful link
https://japanesetest4you.com/flashcard/learn-jlpt-n3-grammar-っぱなし-ppanashi/
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.