You have a couple of options
1. You can put a Condition Action.
In the left side put the expression empty() <== and in between the () put your outputs (which I am assuming is a string
in the middle put is equal to
on the right put the expression true (not the word)
In the Yes side, do nothing, as your string is empty
In the no side, you can put your compose above.
To make it cleaner per se, is you would use a variable and in the yes side use Set variable and set it to empty() or blank or null
In the No side, use the Set variable and put your expression above.
the other option is
you can use coalesce, embedded in your replace
replace(coalesce(outputs('Cursory_Cause'), "PUt something here not blank"),decodeUriComponent('%0A'), '<br />') which would either
you could also build an expression that does something like
@equals(empty(outputs('Cursory_Cause')), false), do your expression here)
To me.. the condition one would, while maybe looking like extra steps, make it super easy to read and support later.
If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.
Thank you!
Sincerely, Michael Gernaey