The PBP default config settings for this PIC are;
device pic16F887, intrc_osc_noclkout, wdt_on, mclr_on, lvp_off, protect_off

So, it's actually running on the internal oscillator.

And the PIC default setting of OSCCAL (for the internal oscillator) is for 4MHz.

Define OSC 20 forces PBP tro assume it's running at 20MHz, but its actually running on
the 4MHz internal osc, so Define OSC 20 screws the timing .. when it's running at 4MHz.

For it to work as expected, at 20MHz, you would need to connect an external 20MHz
crystal (or resonator), and change config settings to;

device pic16F887, hs_osc, wdt_on, mclr_on, lvp_off, protect_off.

Then use the DEFINE OSC 20.