what you need is a diagnostic scan with a Toyota or Equivalent scanner to Retrieve the fault codes from the anti theft module and see why the security alarm is triggered, there several components in the system, from key, to module, door switch hood switch , etc... to see what is failing
If you get it scanned and get codes just post them back here and i can help you further on it if you need to .
We can try Resetting it with the below methods if you have not already .
Master reset Procedure
1- Disconnect Battery Cables ( Negative & Positive Cables )
2- Hold cables Together for 60 secs ,then let go
3- Wait 15 minutes
4- Make sure all doors are closed
5- Reconnect battery Cables
6- Lock & unlock the vehicles using the key from driver door side (if you have a key fob with no blade key, just lock & unlock using the key fob buttons)
7- Enter the vehicle and attempt to start
Let me know if you need anything else on it , just reply back here & we can continue.
if you are good , Please Kindly rate me.
Hope I was helpful to you
A 5 Star Positive Rating is Much Appreciated
This Post Will Stay Open for You To Come back and Ask me Any Follow Up Question You May have on this issue , even after you rate me
ASE Certified Tedchnician