why not trying with the Flash replacement 18F6520 (as microchip says... )

For sure simulation and real world can be different. But i can't say, 'cause i never test it, that's a good pratice to switch analog pin to digital... possible that you need delay. But i don't understand why you want to switch from analog mode to digital.

if you want to shut down the Analog converter, you must use ADCON0.0=0