Which phone do you have? I don't think I've ever been able to to do that on my Pixel phones. Currently, on my 3 XL, if I tap the Reply option to a text message notification, I have to enter my unlock pattern to proceed. This would make sense from a security standpoint -- otherwise, anyone could send false messages in reply to someone if they had your phone without your permission.