Hello @LakpriyaKottahachchi-4754 ,
If the Network Interface of your VM is associated to the ASG NSG with block port 22 rule then you should not be able to SSH to this VM from Internet. Could you please browse to the Network Interface of the VM and check the Effective security rules? Sometimes the VM's NIC may still be connected to it's own NSG and not the ASG NSG. Please check and make sure that the effective security rules has the Deny SSH rule in it.
Kindly let us know if the above helps or you need further assistance on this issue.
Please don’t forget to "Accept the answer" wherever the information provided helps you, this can be beneficial to other community members.