Can the structure “sb doing” replace a clause?
It is grammatically correct to change this to
I suggest that your question is not correct, once again the question is about grammar whilst disregarding meaning or use. "Such" is a word used to emphasis things. So what is the important thing in this sentence? The Blessing or that he has come home safe? I would suggest that the original sentence emphasis both whilst the second does not and also alters the meaning. Lets show this by substituting the meaning of Blessing for it's meaning (something that is extremely lucky or makes you happy) in the sentences
It is such luck/happiness for him to come back safe He is very lucky/happy to have been able to come back
Him coming back safe is such luck/happy His coming back brings a lot of luck/happiness because he is back
So the "whether the grammar may be correct" or not is in my opinion a little irrelevant. The use and therefore meaning should be the more important factor.
Blessing noun (LUCKY SITUATION) Cambridge English dictionary something that is extremely lucky or makes you happy:
P.S. I would also suggest that the use of blessing is wrong in both sentences as I believe that it is trying to imply that the mothers prayers have been answered rather than the luck involved with her son's return.