private static String resubmitResponseCleanup(HttpServletRequest originalRequest) {
        originalRequest.setAttribute(DONT_ADD_ANY_MORE_COOKIES, Boolean.TRUE);
        if (hasFacesContext()) {
            Faces.responseComplete();
        }
        return null;
    }
flash cookie is preserved here

@param request
@param response
@param path
@param paramValues
support/jakarta-ee/src/main/java/org/apache/shiro/ee/filters/FormResubmitSupport.java