The application stops "accepting" response from SQL Server, but the connection is still open and functional. SQL Server continues to run the command to completion.
This is not correct. The timeout error occurs in the client API, so far so good. But SQL Server does not continue executing, because the client sends SQL Server an Attention signal which cancels the current execution. The current statement will be rolled back. However, any transaction will be left open, unless the setting XACT_ABORT is on.
What actually happens in Rahul's case is hard to tell. Maybe client committed the transaction despite the error. Maybe there never was any transaction in the first place.
In any case, the secondary replica does not change how the rollback works. It may add some waits, but the rollback will still happen. If there is any, that is.