You wrote:
"I then subsequently amend the [limit] order in TWS to change it to say a market order"
I would not recommend this. instead just cancel the limit order and issue a new market order if that is your (strategy's) intention.
Note that there are differences in the way orders are handled with respect to edemo, paper trading and funded accounts. As far as I can tell these are not documented well and may differ between asset types.
?