This should be possible in principle, but would require effort trying to reverse-engineer how Better Grass works (difficult, again, because Optifine is closed-source). An easier option would be to just make the grass block 6-sided, or to add a 6-sided custom grass block in the 1.16.5 migration...