Lock row with formula

would love to be able to lock a row in a table
and doing so with a formula

my use case
we have a doc in which we prepare invoices
once the state of an invoice is set to ‘send’
then that row can never be changed again

additionally
it would be great that the numbers in that row would not be calculated anymore (so if a number in an other table would be changed, that locked row doesn’t change anymore)

I have created a work around with extra columns that get the fixed number copied, but it is very cumbersome to set up.