Using @kwdef already defines a method for A1{T}() where T<:Real, which requires a keyword, and which is called even when you define a (somewhat less specific) method A1{T}() = ...:
julia> Base.@kwdef struct A1{T <: Real}
n::Int
end
julia> methods(A1{Float})
# 2 methods for type constructor:
[1] A1{T}(; n) where T<:Real in Main at util.jl:483
[2] A1{T}(n) where T<:Real in Main at REPL[1]:2
(remember that keywords are not dispatched on).