[SalesForce] Updated Values after VF PageReference redirect back to Lightning record page not appearing

I am attempting to emulate a Confirm process that was once handled well by a Javascript button. The idea is to ask for a Confirmation when attempting to deactivate a record.

To do this, I am creating a simple VF page using an controller extension.
The PageMessages receive an INFO level confirmation message, and the button will call a method to deactivate and save the record, then redirect back to it:

From the record detail in Lightning Experience, I have a quick action button that references a VF page.

Ultimately the process is working, but when the page redirects back to the original record, the Active switch is still appears as checked, even though one or two hard refreshes show that its actually deactivated in the database. Here is the code

<apex:page standardController="Activity__c" extensions="Deactivate">
<apex:pageMessages />
<apex:form >
    <apex:pageBlock>
        <apex:pageBlockButtons location="top">
            <apex:commandButton action="{!DeActivate}" value="DeActivate Activity" rendered="{!Active = true}"/>
            <apex:commandButton action="{!Cancel}" value="Cancel" />
        </apex:pageBlockButtons>
    </apex:pageBlock>
</apex:form>

public with sharing class DeactivateController{
Public Activity__c pActivity {get; set;}
Public Boolean Active {get; set;}

public Deactivate(ApexPages.StandardController ctr){
    this.pActivity = (Activity__c) ctr.getRecord();
    this.pActivity = [Select id, Active__c from Activity__c Where Id = :this.pActivity.Id];
    Active = this.pActivity.Active__c;
    confirm();
}

private void confirm(){
    if (Active){
        ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'Confirm Deactivate?'));
    }
}

public pageReference DeActivate(){
    pActivity.Active__c = False;
    update pActivity;
    PageReference pageRef = new PageReference('/'+pActivity.Id);

    pageRef.setRedirect(true);
    return pageRef;

}
}

I've also tried new PageReference('/one/one.app#/sObject/'+pActivityId+'/view');
as well as the full URL with https
In all cases, the Record page returns, but Active still appears checked, even though it isn't in the database. If I refresh the page a couple of times, it finally comes up correct.

Best Answer

I finally figured this out. This is actually a known issue between VF and background Apex changes (thanks Salesforce), along with navigation back to a Standard Page via PageReference:

https://success.salesforce.com/issues_view?id=a1p3A0000001C8QQAU&title=data-not-updated-in-ui-after-an-apex-update-in-lightning-experience

I found this Post that explained how to use remoting to force the refresh (in Lightning):

https://www.sales4k.com/sfdc/salesforce-lightning-refresh/

Unfortunately, that also did NOT (or no longer does) work either. It did however lead me to Googling caching issues with sforce.one.navigateToSObject in Lightning, where I found a Post that said sforce.one.back(true) does work in Lighting. Finally, I got it to work, using this approach. The following example illustrates my final solution:

Visual Force .page file:

<apex:page controller="YOUR_CONTROLLER" action="{!Launch}" cache="false" 
 lightningstylesheets="true">

   <script src="/soap/ajax/38.0/connection.js" type="text/javascript"></script>
   <script src="/soap/ajax/38.0/apex.js" type="text/javascript"></script>
   <script type="text/javascript">

      // Back NAV.Refreshed
      sforce.one.back(true); // While sforce.one.navigateToSObject(YOUR_ID) did NOT 
                             // refresh, sforce.one.back(true) did refresh

    </script>
</apex:page>

Apex Controller

global class YOUR_CONTROLLER  
{   
   public void Launch()
   {
      // Your update logic goes here (will properly refresh on backward navigation)
      ...
   }
}