Hi,
I have tried to failover SQLServer AlwaysOn
Your description sounds like you run failover on the SQL Server but not the Window Cluster (both VM running well) and therefore in the SQL Server level you moved to the secondary but checking the information in the Window Cluster level the primary machine is running well. I assume that you follow something like this procedure:
Don't confuse between failover of the SQL Server and the fact the machines both can stay available.
So how the application should know to point the right SQL Server?
As documented here well: https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/listeners-client-connectivity-application-failover?view=sql-server-ver16&WT.mc_id=DP-MVP-5001699
Once you've configured your availability group listener, you'll need to update your connection string to connect to the Always On availability group listener. This will route traffic from your application automatically to the intended replica