So, "Azure Logic Apps automatically or implicitly performs base64 encoding or decoding, so you don't have to manually perform these conversions by using the corresponding functions..." does not work all the time - the degree of frustration is ... well, very high.
What I found is that ALA strips off base64 / decodebase64 when these functions are the outtest in the expression. If you wrap your expression with, for example, concat(), ALA will not remove it.
Yes, it adds some overhead that might be considerable within "For each" actions, but it's better than getting frustrated more and more with how inconsistent Microsoft is.