Accidentally fishing got me killed, probably my most frustrating death so far

I was fighting on a beach and went to heal myself using the Y button to access my food. Just so happens I was standing on a fishing spot, so I cast my line into the water and was immediately killed by my enemy.

Is it possible to prevent fishing (or other resource harvesting) when in combat?

“Y button” isnt it F to eat food?

I havent faced any similar problem

No I like harvest when fighting.

Same, It’s like sending a message to the mob.

I value that resource more than our life and death battle.