So, going prone while in a foxhole will cancel the foxhole state. That's fine and well understood. What happens if a troop with Sapper is prone, and uses the Sapper long skill to enter the Foxhole state? is it the foxhole state automatically cancelled, or is the prone state cancelled?
I believe the prone state is cancelled as a consequence of the Foxhole state applying a silhouette change. Either way, being prone and using the sapper skill shouldn't result in failure because only entering the prone state cancels a foxhole.
Like RobertShepherd wrote, strictly mechanically neither should cancel, though I'd like it if in future versions of the game Foxhole just like Jump was not allowed while Prone. I would personally rule that effects of Foxhole, being the latest applied, supersedes Prone.
Nothing in the Prone rules or the Sapper rules will cancel the Prone state. However, I strongly suggest applying the Cancellation clause for Prone state, period, not just for entering Prone state.