since we are in read only connection string we are getting error of read only database. do we have any work around to overcome such scenario.
No you do not have any workaround, the database is in read-only mode which mean only read queries can run. You would have to remove the insert part and put it in other procedure which runs on primary replica