After change rules Firebase test mode to locked mode, database show last value

I change my FireBase rule as who is authanticated, write and read data. Also i generate JSON Web Token for Node-Red to access database. After these changes Node red push first name to first value and and other names push lastest value. when i change rules and delete JSON Web Token, every thing work correct. Why did that cause?