There is no where near enough information in the description to analyze this problem. Missing: Any modifications done to the bike from stock. Compression test results. Exact description and/or video of the experience. Fuel pressure and volume tests. Ignition spark and timing tests.
This has been posted before and typically the owner goes off changing all kinds with things with every suggestion anyone takes a guess at. Typically gives up and sells the bike as a "lemon".
Here's the thing. I can make the same stalling symptoms on a perfectly running bike easily by simply dragging the rpm's down below what a bike, without any significant idle control system, can recover from when the clutch is finally pulled in. In several cases, demonstrating that has eliminated the problem forever for the owner. Pretty much anyone has had that happen when being in second gear instead of first but it can easily be done in first too
Low compression is a highly contributing factor as is lightening up the rotating components in the engine.
Electrical isses in the ground system and charging system can cause the ECU to reboot. Questionable relays can shut down systems when the coil side of the relay is receiving a lower voltage than at higher rpm's.
Valve adjustment is perhaps more critical to when the throttle is chopped than any other time in the rpm range. One flaking rocker can cause one cylinder to have altered cam timing and result in a compression issue . In a twin, this means that at idle, every ignition is critical and missing one firing or two will stall the engine.
Low fuel pressure will make it very difficult for the injectors to measure fuel correctly. This can be a restriction in the fuel system, fuel pressure regulator intermittent problem, or in the case of an electrical pump, sub standard voltage and current supply to the pump.
Questionable ignition components, spark plus, coils that aren't firing at low voltage, incorrect timing ,etc,
Here is what I keep saying all along, and few listen. DON'T replace any components or adjust anything without a reason verified with test results. Start testing systems and don't change anything that tests good. Every time you change a component or setting, you risk creating a new problem. Once you have stacked another issue or two on top of the original problem, you can create a scenario that defies logic to even an experienced mechanic. Don't mask the original problem by screwing with things randomly!
If the bike ever has a starting problem, check all the grounds to the engine, ECU, and dash. If they are good, try a replacement battery.
I suggest you move on by seeing if the bike has good and equivalent compression in both cylinders.
Then check the running electrical system, (especially with your dash light comment) Put a voltmeter, not on the battery, but on the circuit powering the ignition and FI, and monitor it while you are riding.
Next, determine if the valves are adjusted correctly, i.e., little clearance on the closers and a lot on the openers. If the cam timing is adjustable, check the cam timing empirically.
Finally, makes sure there is adequate fuel pressure and volume. That means into the cylinder so you may need to pull the injectors and test the spray pattern. Since the test is by blowing a solvent through an open injector, the test is also a repair but it does not change any settings and can't hurt as long as you can get them back inlace correctly.
An engine will idle correctly, even from an abrupt TB closure, if it has compression, correct cam and ignition timing, and consistent fuel supply if the RPM isn't forced below it's idle range by the drive train. The one exception is when the moving mass is reduced below what the required idle RPM is to get it through the next cycle. So, if you need to pull the clutch in sooner, do so. Otherwise, work your way through the diagnostics and don't change anything that isn't indicated by the testing. The one thing you can do is to to add a cleaner, like Techron, to the fuel in an effort to clean the fuel system (injectors), especially if you do not buy top tier fuel that includes cleaners. I buy Tehron at Costco and add some occasionally so that I can buy discounted fuel in my vehicles.