Transaction Log usage fluctuation
The information in your question leads me to believe that some kind of log truncation is occurring between your first invocation of DBCC SQLPERF('LOGSPACE') and your second invocation.  According to The Transaction Log, (specifically the section Factors that can delay log truncation),  there are numerous things that can prevent log truncation.  You mentioned the fact that the database is in a High Availability Group.  I'd suggest periodically querying the sys.databases catalog view (log_reuse_wait and log_reuse_wait_desc columns).  Perhaps "a secondary replica of an availability group is applying transaction log records of this database to a corresponding secondary database. and when that completes, the VLF's are marked for reuse."