Maybe if it crashed in the ocean. If it crashed on land, then they would almost certainly find the device in the wreckage as in the Pan Am 103 bombing [1] where they found even scraps of disintegrated clothing in the suitcase carrying the bomb. The flight recorder would also almost certainly show the nonsensical inputs and outputs and the pilot confusion. And, unlike other industries, aviation does real root cause analysis to identify every factor involved in a crash so it would be exceedingly unlikely they would throw their hands up into the air and just blame the pilot or something as stupid like that.
The chances of a attack like this being undetectable are exceedingly low. You would likely need to compromise nearly every aspect of the plane to make sure you have suppressed every available cross-checking mechanism. Does not stop it from happening, but it would not, in any way, be some sort of magic assassin weapon.
[1] https://en.wikipedia.org/wiki/Pan_Am_Flight_103_bombing_inve...