when car is cut off,the tail lights will come on for a few seconds and then go off and come back on and the doors will unlock.sometimes it won’t start.
Clearly you have a problem that needs fixing. A problem that cannot be diagnosed over the internet, especially with so little information. Take it to a well rated independent local auto repair shop. Expect to pay them for time spent diagnosing your problem. Try to give them more info than you did for us.
The vehicle may have a BCM that’s starting to fail.
Tester
Tail lights can turn on and off with vehicle parked, keys removed, b/c of a faulty brake light switch. Doesn’t seem like that would explain the door issue or the won’t start problem. By “won’t start” do you mean fails to crank – that rr rrr rrr sound with key in start? Or do you mean it cranks ok, but won’t catch and run?