Hi,
I am playing on 1.1.6 with Krastorio 1.0.16, Space Exploration and Mining Drones. I noticed that with this combination, the research costs for Mining Drone Productivity and Mining Drone Speed get all weird.
Space Exploration makes a bunch of procedural changes to the technologies in order to insert their new space science and adjusts the costs. As a result, the later levels of Mining Productivity require extra variants of science packs, but the overall count is adjusted down. When I play with both Krastorio and SE, the extra science packs get removed, which means that some levels of Productivity cost strictly less than the previous level.
This also affects Mining Drone Speed, to a lesser extent.
I think the costs for drone speed and productivity should match the ones for the electric mining drills. I don't know which part of your code is causing this to happen, but if you give me a pointer, I can also see if I can find the issue. I would also ask in the SE discord, but I don't have a discord account.